Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
pipe = pipeline("image-to-text",
|
|
@@ -12,4 +12,15 @@ iface = gr.Interface(launch,
|
|
| 12 |
inputs=gr.Image(type='pil'),
|
| 13 |
outputs="text")
|
| 14 |
|
| 15 |
-
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
pipe = pipeline("image-to-text",
|
|
|
|
| 12 |
inputs=gr.Image(type='pil'),
|
| 13 |
outputs="text")
|
| 14 |
|
| 15 |
+
iface.launch()
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
import gradio as gr
|
| 19 |
+
|
| 20 |
+
def greet(name):
|
| 21 |
+
return "Hello, " + name + "!"
|
| 22 |
+
|
| 23 |
+
demo = gr.Interface(
|
| 24 |
+
fn=greet,
|
| 25 |
+
inputs=["text", "slider"],
|
| 26 |
+
outputs=["text"],
|