Spaces:
Running
Running
File size: 781 Bytes
9c3d10b c824607 b8284a1 9c3d10b b8284a1 7c2d1cf b8284a1 7c2d1cf b8284a1 7c2d1cf b8284a1 a5cf614 9c3d10b b8284a1 9c3d10b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
import gradio as gr
import sys
sys.path.insert(0, "ASG.API/")
from ASGModels import ASG
ASGAI=ASG(isForm=False)
choices=[
"Group",
"Technique",
"Software"
]
model_choices = gr.Dropdown(
choices=choices,
label="اختر النموذج",
value="Group",
)
def greet(text,namn_model):
if namn_model=="Group":
out=ASGAI.Group.predictAPI(text)
elif namn_model=="Technique":
out=ASGAI.Tec.predictAPI(text)
else:
out=ASGAI.Soft.predictAPI(text)
return str(out)
demo = gr.Interface(fn=greet, inputs=["text",model_choices], outputs="text")
demo.launch()
|