Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
-
from
|
| 2 |
-
import
|
| 3 |
|
| 4 |
-
model
|
| 5 |
|
| 6 |
def.predict(prompt)
|
| 7 |
-
|
| 8 |
-
|
| 9 |
|
| 10 |
-
with
|
| 11 |
-
|
| 12 |
-
|
| 13 |
|
| 14 |
demo.launch()
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
import gradio as gr
|
| 3 |
|
| 4 |
+
model = pipeline("summarization")
|
| 5 |
|
| 6 |
def.predict(prompt)
|
| 7 |
+
sumary = model(prompt)[0]["summaary_text"]
|
| 8 |
+
return summary
|
| 9 |
|
| 10 |
+
with gr.Blocks().as.demo:
|
| 11 |
+
textbox = gr Textbox(placeholder="Enter.text.block.to.summarize",.lines=4)
|
| 12 |
+
gr.interface(fn=predict, .inputs=textbox, .outputs="text")
|
| 13 |
|
| 14 |
demo.launch()
|