yasserrmd commited on
Commit
90bb291
·
verified ·
1 Parent(s): 1d3ecc9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -86,27 +86,29 @@ def create_chat_interface():
86
  gr.Markdown("## Math Hint Chat")
87
  gr.Markdown(
88
  "This chatbot provides hints and step-by-step guidance for solving math problems. "
 
89
  )
90
 
91
  chatbot = gr.Chatbot(label="Math Tutor Chat")
92
  user_input = gr.Textbox(
93
- placeholder="Ask your math question here (e.g., guide me to solve x: 4x + 5 = 6x + 7)",
94
  label="Your Query"
95
  )
96
  send_button = gr.Button("Send")
97
 
98
- # Hidden state to manage chat history
99
  chat_history = gr.State([])
100
 
101
  # Button interaction for chat
102
  send_button.click(
103
  fn=generate_response,
104
  inputs=[chat_history, user_input],
105
- outputs=[chatbot, chat_history]
106
  )
107
 
108
  return chat_app
109
 
110
 
 
111
  app = create_chat_interface()
112
  app.launch(debug=True)
 
86
  gr.Markdown("## Math Hint Chat")
87
  gr.Markdown(
88
  "This chatbot provides hints and step-by-step guidance for solving math problems. "
89
+ "It will not reveal the final answer."
90
  )
91
 
92
  chatbot = gr.Chatbot(label="Math Tutor Chat")
93
  user_input = gr.Textbox(
94
+ placeholder="Ask your math question here (e.g., Solve for x: 4x + 5 = 6x + 7)",
95
  label="Your Query"
96
  )
97
  send_button = gr.Button("Send")
98
 
99
+ # Hidden state for managing chat history
100
  chat_history = gr.State([])
101
 
102
  # Button interaction for chat
103
  send_button.click(
104
  fn=generate_response,
105
  inputs=[chat_history, user_input],
106
+ outputs=[chatbot]
107
  )
108
 
109
  return chat_app
110
 
111
 
112
+
113
  app = create_chat_interface()
114
  app.launch(debug=True)