Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import sys
|
|
|
|
| 3 |
|
| 4 |
sys.path.insert(0, "ASG.API/")
|
| 5 |
from ASGModels import ASG
|
|
@@ -193,13 +194,13 @@ def s2s(text):
|
|
| 193 |
"score": score
|
| 194 |
}
|
| 195 |
datase.append(tutorial)
|
|
|
|
| 196 |
return tutorial
|
| 197 |
ASGAI.cks.onsequens=addsenario
|
| 198 |
|
| 199 |
-
text_output=ASGAI.search([text],
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
return str(datase)
|
| 203 |
|
| 204 |
|
| 205 |
# Use Blocks
|
|
@@ -258,13 +259,12 @@ with gr.Blocks() as demo:
|
|
| 258 |
gr.ChatInterface(fn=echo, title="Echo Bot")
|
| 259 |
|
| 260 |
with gr.Tab("T2Sinaror"):
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
|
| 269 |
|
| 270 |
with gr.Tab("Stute Base"):
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import sys
|
| 3 |
+
import pandas as pd
|
| 4 |
|
| 5 |
sys.path.insert(0, "ASG.API/")
|
| 6 |
from ASGModels import ASG
|
|
|
|
| 194 |
"score": score
|
| 195 |
}
|
| 196 |
datase.append(tutorial)
|
| 197 |
+
|
| 198 |
return tutorial
|
| 199 |
ASGAI.cks.onsequens=addsenario
|
| 200 |
|
| 201 |
+
text_output=ASGAI.search([text],numstop=50)
|
| 202 |
+
df = pd.DataFrame(datase)
|
| 203 |
+
return df
|
|
|
|
| 204 |
|
| 205 |
|
| 206 |
# Use Blocks
|
|
|
|
| 259 |
gr.ChatInterface(fn=echo, title="Echo Bot")
|
| 260 |
|
| 261 |
with gr.Tab("T2Sinaror"):
|
| 262 |
+
text_input_seqttt = gr.Textbox(label="Input Text")
|
| 263 |
+
submit_btn_seqtt = gr.Button("Submit")
|
| 264 |
+
text_out_seqttt = gr.Dataframe(headers=["seqtactic", "iduser", "seqtec", "score"], datatype="str", label="Output")
|
| 265 |
+
|
| 266 |
+
submit_btn_seqtt.click(fn=s2s, inputs=[text_input_seqttt], outputs=text_out_seqttt)
|
| 267 |
+
|
|
|
|
| 268 |
|
| 269 |
|
| 270 |
with gr.Tab("Stute Base"):
|