Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
|
| 3 |
def greet(name):
|
| 4 |
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
| 7 |
iface.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from transformers import AutoModel
|
| 3 |
+
|
| 4 |
|
| 5 |
def greet(name):
|
| 6 |
return "Hello " + name + "!!"
|
| 7 |
|
| 8 |
+
model = AutoModel.from_pretrained("models/last.pt")
|
| 9 |
+
pipe = pipeline("image-segmentation", model = model)
|
| 10 |
+
iface = gr.Interface.from_pipeline(pipe)
|
| 11 |
+
# iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 12 |
iface.launch()
|