Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -232,12 +232,17 @@ def chat(message, history):
|
|
| 232 |
history.append((message, response))
|
| 233 |
return history, history
|
| 234 |
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 242 |
if __name__ == "__main__":
|
| 243 |
demo.launch(debug=True)
|
|
|
|
| 232 |
history.append((message, response))
|
| 233 |
return history, history
|
| 234 |
|
| 235 |
+
with gr.Blocks() as demo:
|
| 236 |
+
user_state=gr.State([])
|
| 237 |
+
gr.Markdown("""# StackTrace QA Bot""")
|
| 238 |
+
with gr.Row():
|
| 239 |
+
with gr.Column():
|
| 240 |
+
inp = gr.Textbox(placeholder="enter your stacktrace here")
|
| 241 |
+
btn = gr.Button("Enter message")
|
| 242 |
+
output = gr.Chatbot().style(color_map=("green", "pink"))
|
| 243 |
+
# allow_flagging="never",
|
| 244 |
+
btn.click(chat, [inp, user_state], [output, user_state])
|
| 245 |
+
gr.Markdown("""### need help? got feedback? have thoughts? etc. ➜ Join the [Discord](https://discord.gg/KvG3azf39U)""")
|
| 246 |
+
|
| 247 |
if __name__ == "__main__":
|
| 248 |
demo.launch(debug=True)
|