wasmdashai commited on
Commit
aa40e0e
·
verified ·
1 Parent(s): 1536913

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -37,6 +37,9 @@ def t2seq(text, namn_model):
37
  else:
38
  out = ASGAI.Soft.Predict_ALL(text)
39
  return str(out)
 
 
 
40
 
41
  # Use Blocks
42
  with gr.Blocks() as demo:
@@ -44,20 +47,25 @@ with gr.Blocks() as demo:
44
  with gr.Tab("Thread Base"):
45
  gr.Markdown("### Thread Base")
46
  with gr.Row():
 
47
  with gr.Tab("T2T"):
48
  text_input = gr.Textbox(label="Input Text")
49
- model_choices = gr.Dropdown(choices=["Group", "Technique", "Soft"], label="Model")
50
  text_output = gr.Textbox(label="Output")
51
  submit_btn = gr.Button("Submit")
52
  submit_btn.click(fn=t2t, inputs=[text_input, model_choices], outputs=text_output)
53
 
54
  with gr.Tab("T2Seq"):
55
  text_input_seq = gr.Textbox(label="Input Text")
56
- model_choices_seq = gr.Dropdown(choices=["Group", "Technique", "Soft"], label="Model")
57
  text_output_seq = gr.Textbox(label="Output")
58
  submit_btn_seq = gr.Button("Submit")
59
  submit_btn_seq.click(fn=t2seq, inputs=[text_input_seq, model_choices_seq], outputs=text_output_seq)
60
 
 
 
 
 
61
 
62
  with gr.Tab("Stute Base"):
63
  gr.Markdown("### Stute Base")
 
37
  else:
38
  out = ASGAI.Soft.Predict_ALL(text)
39
  return str(out)
40
+ def echo(message, history):
41
+ return message
42
+
43
 
44
  # Use Blocks
45
  with gr.Blocks() as demo:
 
47
  with gr.Tab("Thread Base"):
48
  gr.Markdown("### Thread Base")
49
  with gr.Row():
50
+
51
  with gr.Tab("T2T"):
52
  text_input = gr.Textbox(label="Input Text")
53
+ model_choices = gr.Dropdown(choices=["Group", "Technique", "Soft"], label="Model",value="Group",)
54
  text_output = gr.Textbox(label="Output")
55
  submit_btn = gr.Button("Submit")
56
  submit_btn.click(fn=t2t, inputs=[text_input, model_choices], outputs=text_output)
57
 
58
  with gr.Tab("T2Seq"):
59
  text_input_seq = gr.Textbox(label="Input Text")
60
+ model_choices_seq = gr.Dropdown(choices=["Group", "Technique", "Soft"], label="Model",value="Group",)
61
  text_output_seq = gr.Textbox(label="Output")
62
  submit_btn_seq = gr.Button("Submit")
63
  submit_btn_seq.click(fn=t2seq, inputs=[text_input_seq, model_choices_seq], outputs=text_output_seq)
64
 
65
+ with gr.Tab("T2Sinaro"):
66
+ gr.ChatInterface(fn=echo, examples=["hello", "hola", "merhaba"], title="Echo Bot")
67
+
68
+
69
 
70
  with gr.Tab("Stute Base"):
71
  gr.Markdown("### Stute Base")