PawelMar commited on
Commit
b163a45
·
verified ·
1 Parent(s): d2ea47e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -1,7 +1,12 @@
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
  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()