Update app.py
Browse files
app.py
CHANGED
@@ -8,10 +8,16 @@ def summarize(input):
|
|
8 |
output = get_completion(input)
|
9 |
return output[0]['summary_text']
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
gr.close_all()
|
12 |
-
|
13 |
-
inputs=[gr.Textbox(label="Text to summarize", lines=6)],
|
14 |
-
outputs=[gr.Textbox(label="Result", lines=3)],
|
15 |
-
title="Summarize any text using the `Falconsai/text_summarization` model under the hood!"
|
16 |
-
)
|
17 |
demo.launch(share=True)
|
|
|
8 |
output = get_completion(input)
|
9 |
return output[0]['summary_text']
|
10 |
|
11 |
+
with gr.Blocks() as demo:
|
12 |
+
gr.Markdown("# Summarisation with Falconsai")
|
13 |
+
with gr.Row():
|
14 |
+
with gr.Column(min_width=900):
|
15 |
+
inputs = gr.Textbox(label="Text to summarize", lines=6)
|
16 |
+
btn = gr.Button("Submit") #Submit button
|
17 |
+
outputs = gr.Textbox(label="Result", lines=3)
|
18 |
+
|
19 |
+
btn.click(fn=summarize, inputs=[input], outputs=[output])
|
20 |
+
|
21 |
gr.close_all()
|
22 |
+
|
|
|
|
|
|
|
|
|
23 |
demo.launch(share=True)
|