Spaces:
Build error
Build error
Commit
·
337d2a4
1
Parent(s):
18526df
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,22 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
|
| 3 |
def greet(name):
|
| 4 |
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
from gradio.mix import Parallel, Series
|
| 4 |
|
| 5 |
def greet(name):
|
| 6 |
return "Hello " + name + "!!"
|
| 7 |
|
| 8 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
desc = "Summarize some text!"
|
| 12 |
+
|
| 13 |
+
sample = [[y],[x],[z]]
|
| 14 |
+
|
| 15 |
+
iface = Parallel(
|
| 16 |
+
theme='huggingface',
|
| 17 |
+
title= 'Hugging Face Text Summarizer',
|
| 18 |
+
description = desc,
|
| 19 |
+
examples=None, #replace "sample" with directory to let gradio scan through those files and give you the text
|
| 20 |
+
inputs = gr.inputs.Textbox(lines = 10, label="Text"))
|
| 21 |
+
|
| 22 |
+
iface.launch(inline = False)
|