Makima57 commited on
Commit
a3f7371
·
verified ·
1 Parent(s): 246a616

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -74,8 +74,7 @@ def majority_vote_with_steps(question, num_iterations=10):
74
  # Gradio interface for user input and output
75
  def gradio_interface(question, correct_answer):
76
  final_answer, steps_solution = majority_vote_with_steps(question, iterations)
77
- return question, final_answer, steps_solution, correct_answer
78
-
79
 
80
  # Custom CSS for enhanced design (unchanged)
81
  custom_css = """
@@ -166,12 +165,11 @@ custom_css = """
166
  }
167
  """
168
 
169
- # Gradio app setup
170
  interface = gr.Interface(
171
  fn=gradio_interface,
172
  inputs=[
173
  gr.Textbox(label="🧠 Math Question", placeholder="Enter your math question here...", elem_id="math_question"),
174
-
175
  ],
176
  outputs=[
177
  gr.Textbox(label="Majority-Voted Answer", interactive=False), # Non-editable
@@ -180,7 +178,9 @@ interface = gr.Interface(
180
  ],
181
  title="🔢 Math Question Solver",
182
  description="Enter a math question to get the model's majority-voted answer and steps to solve the problem.",
183
- css=custom_css # Apply custom CSS
 
 
184
  )
185
 
186
  if __name__ == "__main__":
 
74
  # Gradio interface for user input and output
75
  def gradio_interface(question, correct_answer):
76
  final_answer, steps_solution = majority_vote_with_steps(question, iterations)
77
+ return question, final_answer, steps_solution, correct_answer
 
78
 
79
  # Custom CSS for enhanced design (unchanged)
80
  custom_css = """
 
165
  }
166
  """
167
 
168
+ # Gradio app setup with flagging
169
  interface = gr.Interface(
170
  fn=gradio_interface,
171
  inputs=[
172
  gr.Textbox(label="🧠 Math Question", placeholder="Enter your math question here...", elem_id="math_question"),
 
173
  ],
174
  outputs=[
175
  gr.Textbox(label="Majority-Voted Answer", interactive=False), # Non-editable
 
178
  ],
179
  title="🔢 Math Question Solver",
180
  description="Enter a math question to get the model's majority-voted answer and steps to solve the problem.",
181
+ css=custom_css, # Apply custom CSS
182
+ flagging_dir="flagged_data", # Directory to save flagged data
183
+ allow_flagging="auto" # Allow users to auto flag data
184
  )
185
 
186
  if __name__ == "__main__":