Spaces:
Sleeping
Sleeping
Commit ·
aea603d
1
Parent(s): 7a7ea54
Update app.py
Browse files
app.py
CHANGED
|
@@ -306,13 +306,31 @@ def gradio_chatbox(input,history):
|
|
| 306 |
history = history or []
|
| 307 |
|
| 308 |
typed_ques = input
|
| 309 |
-
answe, query_type = output_generation(typed_ques)
|
| 310 |
|
| 311 |
-
|
| 312 |
-
output
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 316 |
|
| 317 |
block = gr.Blocks()
|
| 318 |
|
|
@@ -322,7 +340,7 @@ with block:
|
|
| 322 |
gr.Markdown(f'<center><h1>{img_}</h1></center>')
|
| 323 |
gr.Markdown(description)
|
| 324 |
chatbot = gr.Chatbot(label="Tax GenAI")
|
| 325 |
-
message = gr.Textbox(label='Please ask your question',placeholder = "Welcome! This is Tax GenAI
|
| 326 |
state = gr.State()
|
| 327 |
|
| 328 |
submit = gr.Button("SEND")
|
|
|
|
| 306 |
history = history or []
|
| 307 |
|
| 308 |
typed_ques = input
|
|
|
|
| 309 |
|
| 310 |
+
|
| 311 |
+
def output(answe):
|
| 312 |
+
ccc = "{0}".format(answe)
|
| 313 |
+
output = ccc
|
| 314 |
+
history.append((input,output))
|
| 315 |
+
#print(history)
|
| 316 |
+
return history, history
|
| 317 |
+
|
| 318 |
+
if typed_ques == "Hello" :
|
| 319 |
+
answe = "Do you have myGovID or wnat to continue as Guest."
|
| 320 |
+
output(answe)
|
| 321 |
+
|
| 322 |
+
elif typed_ques == "I have myGovID":
|
| 323 |
+
answe = "Hi User, Please Enter Username"
|
| 324 |
+
output(answe)
|
| 325 |
+
else:
|
| 326 |
+
answe = "Hi "+ typed_ques + ", Please Enter Password"
|
| 327 |
+
output(answe)
|
| 328 |
+
|
| 329 |
+
answe, query_type = output_generation(typed_ques)
|
| 330 |
+
|
| 331 |
+
return output(answe)
|
| 332 |
+
|
| 333 |
+
|
| 334 |
|
| 335 |
block = gr.Blocks()
|
| 336 |
|
|
|
|
| 340 |
gr.Markdown(f'<center><h1>{img_}</h1></center>')
|
| 341 |
gr.Markdown(description)
|
| 342 |
chatbot = gr.Chatbot(label="Tax GenAI")
|
| 343 |
+
message = gr.Textbox(label='Please ask your question',placeholder = "Welcome! This is Tax GenAI. Type ""Hello"" to continue.")
|
| 344 |
state = gr.State()
|
| 345 |
|
| 346 |
submit = gr.Button("SEND")
|