Pisethan commited on
Commit
aa4acd3
·
verified ·
1 Parent(s): 6d02010

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -66,6 +66,14 @@ def predict(input_text):
66
  # Gradio interface
67
  import gradio as gr
68
 
 
 
 
 
 
 
 
 
69
  interface = gr.Interface(
70
  fn=predict,
71
  inputs=gr.Textbox(lines=2, placeholder="Enter a math problem..."),
@@ -75,6 +83,7 @@ interface = gr.Interface(
75
  ],
76
  title="Sangapac Math Model",
77
  description="A model to classify math problems into categories like Arithmetic, Multiplication, Division, Algebra, and Geometry.",
 
78
  )
79
 
80
  # Launch the app
 
66
  # Gradio interface
67
  import gradio as gr
68
 
69
+ # Define sample inputs
70
+ sample_inputs = [
71
+ ["1 + 1 = ?"],
72
+ ["(5 + 3) × 2 = ?"],
73
+ ["12 ÷ 4 = ?"],
74
+ ["Solve for x: x + 5 = 10"],
75
+ ]
76
+
77
  interface = gr.Interface(
78
  fn=predict,
79
  inputs=gr.Textbox(lines=2, placeholder="Enter a math problem..."),
 
83
  ],
84
  title="Sangapac Math Model",
85
  description="A model to classify math problems into categories like Arithmetic, Multiplication, Division, Algebra, and Geometry.",
86
+ examples=sample_inputs, # Add examples below the Clear and Submit buttons
87
  )
88
 
89
  # Launch the app