Spaces:
Runtime error
Runtime error
小 效懈褔械褉懈薪
commited on
Commit
路
d3426a1
1
Parent(s):
26ee91d
fixed gradio interface
Browse files
app.py
CHANGED
@@ -12,14 +12,19 @@ model.load_state_dict(state_dict)
|
|
12 |
model.eval()
|
13 |
|
14 |
def predict(inp):
|
|
|
15 |
res = inference_img(model, inp)
|
16 |
-
|
|
|
17 |
return res
|
18 |
|
|
|
|
|
19 |
|
20 |
-
gr.Interface(fn=predict,
|
21 |
inputs=gr.Image(type="numpy"),
|
22 |
outputs=gr.Image(type="numpy"),
|
23 |
-
examples=["./logo.jpeg"])
|
|
|
24 |
|
25 |
iface.launch()
|
|
|
12 |
model.eval()
|
13 |
|
14 |
def predict(inp):
|
15 |
+
print("***********Inference****************")
|
16 |
res = inference_img(model, inp)
|
17 |
+
print("***********Inference finish****************")
|
18 |
+
|
19 |
return res
|
20 |
|
21 |
+
print("MODEL LOADED")
|
22 |
+
print("************************************")
|
23 |
|
24 |
+
iface = gr.Interface(fn=predict,
|
25 |
inputs=gr.Image(type="numpy"),
|
26 |
outputs=gr.Image(type="numpy"),
|
27 |
+
examples=["./logo.jpeg"])
|
28 |
+
print("****************Interface created******************")
|
29 |
|
30 |
iface.launch()
|