Tonic commited on
Commit
b95d9ec
·
verified ·
1 Parent(s): 40c0747

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -12
app.py CHANGED
@@ -53,23 +53,14 @@ def main():
53
  top_p = gr.Slider(label="Top-p (nucleus sampling)", value=0.90, minimum=0.01, maximum=0.99)
54
  repetition_penalty = gr.Slider(label="Repetition penalty", value=1.9, minimum=1.0, maximum=2.0)
55
  do_sample = gr.Checkbox(label="Uncheck for faster inference", value=False)
 
 
 
56
  gr.Button("Try🫡📉MetaMath").click(
57
  predict_math_bot,
58
  inputs=[user_message, system_message, max_new_tokens, temperature, top_p, repetition_penalty, do_sample],
59
  outputs=output_text
60
  )
61
- with gr.Row():
62
- user_message = gr.Textbox(label="🫡Your Message", lines=3, placeholder="Enter your math query here...")
63
- system_message = gr.Textbox(label="📉System Prompt", lines=2, placeholder="Optional: Set a scene or introduce a character...")
64
-
65
-
66
-
67
- # Example placeholders
68
- # demo.add_examples([
69
- # ["Calculate the integral of x^2 from 0 to 1", "produce a complete mathematical explanation of the following in rich text format:", 125, 0.1, 0.9, 1.9, False],
70
- # ["What is the derivative of sin(x)?", "produce a complete mathematical explanation of the following in rich text format:", 125, 0.1, 0.9, 1.9, False]
71
- # ])
72
-
73
  demo.launch()
74
 
75
  if __name__ == "__main__":
 
53
  top_p = gr.Slider(label="Top-p (nucleus sampling)", value=0.90, minimum=0.01, maximum=0.99)
54
  repetition_penalty = gr.Slider(label="Repetition penalty", value=1.9, minimum=1.0, maximum=2.0)
55
  do_sample = gr.Checkbox(label="Uncheck for faster inference", value=False)
56
+ with gr.Row():
57
+ user_message = gr.Textbox(label="🫡Your Message", lines=3, placeholder="Enter your math query here...")
58
+ system_message = gr.Textbox(label="📉System Prompt", lines=2, placeholder="Optional: Set a scene or introduce a character...")
59
  gr.Button("Try🫡📉MetaMath").click(
60
  predict_math_bot,
61
  inputs=[user_message, system_message, max_new_tokens, temperature, top_p, repetition_penalty, do_sample],
62
  outputs=output_text
63
  )
 
 
 
 
 
 
 
 
 
 
 
 
64
  demo.launch()
65
 
66
  if __name__ == "__main__":