Update app.py
Browse files
app.py
CHANGED
@@ -198,7 +198,7 @@ def generate(prompt, history):
|
|
198 |
yield output
|
199 |
|
200 |
|
201 |
-
def submit_user_info(name,occupation,yearsofexp,ethnicity,gender,age
|
202 |
global Name, Occupation,Ethnicity,Gender,Age,chat_log_name,YearsOfExp
|
203 |
print(reset_button)
|
204 |
Name = name
|
@@ -242,7 +242,7 @@ def reset_all():
|
|
242 |
|
243 |
with gr.Blocks() as app:
|
244 |
gr.Markdown("# ECU-IVADE: Enhanced Conversational UI for Virtual Assistance and Dialogue Engagement")
|
245 |
-
unique_id_display = gr.Textbox(value=unique_id, label="Session Unique ID", interactive=False)
|
246 |
|
247 |
with gr.Tab("User Info"):
|
248 |
name = gr.Textbox(label="Name")
|
@@ -252,7 +252,8 @@ with gr.Blocks() as app:
|
|
252 |
gender = gr.Dropdown(choices=["Male", "Female", "Other", "Prefer Not To Say"], label="Gender")
|
253 |
age = gr.Textbox(label="Age")
|
254 |
submit_info = gr.Button("Submit")
|
255 |
-
|
|
|
256 |
|
257 |
with gr.Tab("Chat Bot"):
|
258 |
chatbot = gr.Chatbot()
|
|
|
198 |
yield output
|
199 |
|
200 |
|
201 |
+
def submit_user_info(name,occupation,yearsofexp,ethnicity,gender,age):
|
202 |
global Name, Occupation,Ethnicity,Gender,Age,chat_log_name,YearsOfExp
|
203 |
print(reset_button)
|
204 |
Name = name
|
|
|
242 |
|
243 |
with gr.Blocks() as app:
|
244 |
gr.Markdown("# ECU-IVADE: Enhanced Conversational UI for Virtual Assistance and Dialogue Engagement")
|
245 |
+
unique_id_display = gr.Textbox(value=unique_id, label="Session Unique ID", interactive=False,show_copy_button = True)
|
246 |
|
247 |
with gr.Tab("User Info"):
|
248 |
name = gr.Textbox(label="Name")
|
|
|
252 |
gender = gr.Dropdown(choices=["Male", "Female", "Other", "Prefer Not To Say"], label="Gender")
|
253 |
age = gr.Textbox(label="Age")
|
254 |
submit_info = gr.Button("Submit")
|
255 |
+
status = gr.Textbox(label="Status" ,container = True, scale = 2 ,interactive = False, show_copy_button = True),
|
256 |
+
submit_info.click(submit_user_info, inputs=[name, occupation, yearsofexp, ethnicity, gender, age], outputs=[status])
|
257 |
|
258 |
with gr.Tab("Chat Bot"):
|
259 |
chatbot = gr.Chatbot()
|