Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ model_choices = gr.Dropdown(
|
|
18 |
|
19 |
|
20 |
|
21 |
-
def
|
22 |
if namn_model=="Group":
|
23 |
out=ASGAI.Group.predictAPI(text)
|
24 |
elif namn_model=="Technique":
|
@@ -30,5 +30,26 @@ def greet(text,namn_model):
|
|
30 |
|
31 |
return str(out)
|
32 |
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
|
20 |
|
21 |
+
def t2t(text,namn_model):
|
22 |
if namn_model=="Group":
|
23 |
out=ASGAI.Group.predictAPI(text)
|
24 |
elif namn_model=="Technique":
|
|
|
30 |
|
31 |
return str(out)
|
32 |
|
33 |
+
def t2seq(text,namn_model):
|
34 |
+
if namn_model=="Group":
|
35 |
+
out=ASGAI.Group.Predict_ALL(text)
|
36 |
+
elif namn_model=="Technique":
|
37 |
+
out=ASGAI.Tec.Predict_ALL(text)
|
38 |
+
else:
|
39 |
+
out=ASGAI.Soft.Predict_ALL(text)
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
return str(out)
|
44 |
+
|
45 |
+
tab1 = gr.Interface(fn=greet, inputs=["text",model_choices], outputs="text")
|
46 |
+
tab2 = gr.Interface(fn=greet, inputs=["text",model_choices], outputs="text")
|
47 |
+
import gradio as gr
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
+
demo = gr.TabbedInterface([tab1, tab2], ["T2T", "T2Seq"])
|
52 |
+
|
53 |
+
if __name__ == "__main__":
|
54 |
+
demo.launch()
|
55 |
+
# demo.launch()
|