Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,15 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
gr.load("models/Falconsai/text_summarization").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
gr.load("models/Falconsai/text_summarization").launch()
|
| 4 |
+
|
| 5 |
+
def summarize(input):
|
| 6 |
+
output = get_completion(input)
|
| 7 |
+
return output[0]['summary_text']
|
| 8 |
+
|
| 9 |
+
gr.close_all()
|
| 10 |
+
demo = gr.Interface(fn=summarize,
|
| 11 |
+
inputs=[gr.Textbox(label="Text to summarize", lines=6)],
|
| 12 |
+
outputs=[gr.Textbox(label="Result", lines=3)],
|
| 13 |
+
title="Text summarization with Falconsai",
|
| 14 |
+
description="Summarize any text using the `Falconsai/text_summarization` model under the hood!"
|
| 15 |
+
)
|