Spaces:
Sleeping
Sleeping
Arnab Das
commited on
Commit
·
caa2598
1
Parent(s):
d21ced7
bug fix
Browse files
app.py
CHANGED
@@ -1,12 +1,16 @@
|
|
1 |
import gradio as gr
|
2 |
-
from manipulate_model.utils import get_config_and_model
|
3 |
|
4 |
|
5 |
manpulate_config, manipulate_model = get_config_and_model()
|
|
|
6 |
|
7 |
def process(filepath):
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
10 |
demo = gr.Blocks()
|
11 |
file_proc = gr.Interface(
|
12 |
fn=process,
|
|
|
1 |
import gradio as gr
|
2 |
+
from manipulate_model.utils import get_config_and_model, infere
|
3 |
|
4 |
|
5 |
manpulate_config, manipulate_model = get_config_and_model()
|
6 |
+
manipulate_model.eval()
|
7 |
|
8 |
def process(filepath):
|
9 |
+
global manipulate_model
|
10 |
+
global manpulate_config
|
11 |
+
out = infere(manipulate_model, filepath, manpulate_config)
|
12 |
+
out = out.tolist()
|
13 |
+
return str(out)
|
14 |
demo = gr.Blocks()
|
15 |
file_proc = gr.Interface(
|
16 |
fn=process,
|