Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,17 +66,8 @@ def chatbot(query: str) -> str:
|
|
| 66 |
except Exception as e:
|
| 67 |
return str(e)
|
| 68 |
|
| 69 |
-
# # Create a Gradio GUI interface
|
| 70 |
-
# inputs = gr.Textbox(lines=7, label=chatbot_input_label, placeholder=chatbot_input_placeholder)
|
| 71 |
-
# outputs = gr.Markdown(label=chatbot_output_label)#, placeholder=chatbot_output_placeholder)
|
| 72 |
-
# iface = gr.Interface(fn=chatbot,
|
| 73 |
-
# inputs=inputs,
|
| 74 |
-
# outputs=outputs,
|
| 75 |
-
# title=title,
|
| 76 |
-
# description=description)
|
| 77 |
-
|
| 78 |
# Define the reset function
|
| 79 |
-
def
|
| 80 |
return ""
|
| 81 |
|
| 82 |
# Create a Gradio Blocks interface
|
|
@@ -102,7 +93,7 @@ with gr.Blocks() as demo:
|
|
| 102 |
|
| 103 |
# Define button click actions
|
| 104 |
submit.click(fn=chatbot, inputs=user_input, outputs=output)
|
| 105 |
-
reset.click(fn=
|
| 106 |
|
| 107 |
if __name__ == "__main__":
|
| 108 |
demo.launch()
|
|
|
|
| 66 |
except Exception as e:
|
| 67 |
return str(e)
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
# Define the reset function
|
| 70 |
+
def reset_output():
|
| 71 |
return ""
|
| 72 |
|
| 73 |
# Create a Gradio Blocks interface
|
|
|
|
| 93 |
|
| 94 |
# Define button click actions
|
| 95 |
submit.click(fn=chatbot, inputs=user_input, outputs=output)
|
| 96 |
+
reset.click(fn=reset_output, inputs=None, outputs=output)
|
| 97 |
|
| 98 |
if __name__ == "__main__":
|
| 99 |
demo.launch()
|