Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -50,19 +50,21 @@ with gr.Blocks() as demo:
|
|
50 |
"""
|
51 |
<h1 style="text-align: center;">Legal Document Drafting</h1>
|
52 |
""")
|
53 |
-
with gr.
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
66 |
|
67 |
if __name__ == "__main__":
|
68 |
demo.launch()
|
|
|
50 |
"""
|
51 |
<h1 style="text-align: center;">Legal Document Drafting</h1>
|
52 |
""")
|
53 |
+
with gr.Column():
|
54 |
+
with gr.Tab("Writing Assist"):
|
55 |
+
result = gr.components.Textbox(lines=7, label="Writing Assist", placeholder=prompts[0])
|
56 |
+
prompt = gr.components.Textbox(lines=2, label="Prompt", placeholder=examples[0], visible=False)
|
57 |
+
gr.Examples(examples, label='Examples', inputs=[prompt])
|
58 |
+
prompt.change(generate, inputs=[prompt], outputs=[result])
|
59 |
+
btn = gr.Button("Next sentence")
|
60 |
+
btn.click(generate, inputs=[result], outputs=[result])
|
61 |
+
with gr.Tab("Random Generative"):
|
62 |
+
result2 = gr.components.Textbox(lines=7, label="Random Generative", show_label=True, placeholder=prompts[1])
|
63 |
+
gr.Examples(examples, label='Examples', inputs=[result2])
|
64 |
+
rnd_btn = gr.Button("Random Drafting")
|
65 |
+
rnd_btn.click(rnd_generate, inputs=[result2], outputs=[result2])
|
66 |
+
with gr.Column():
|
67 |
+
gr.Markdown("Legal Document drafting demo")
|
68 |
|
69 |
if __name__ == "__main__":
|
70 |
demo.launch()
|