yasserrmd commited on
Commit
42ff9fc
·
verified ·
1 Parent(s): 598d79e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -11,7 +11,7 @@ def generate_response(prompt_template, **kwargs):
11
  prompt = os.getenv(prompt_template).format(**kwargs)
12
  # Stream the response from the model
13
  stream = client.chat.completions.create(
14
- model="Qwen/Qwen2.5-Math-72B-Instruct",
15
  messages=[{"role": "user", "content": prompt}],
16
  temperature=0.7,
17
  max_tokens=1024,
@@ -41,7 +41,11 @@ with gr.Blocks() as app:
41
  )
42
  elif inp["type"] == "dropdown":
43
  input_fields.append(
44
- gr.Dropdown(choices=inp["choices"], label=inp["label"], value=inp.get("default", ""))
 
 
 
 
45
  )
46
  # Button and output
47
  button = gr.Button(f"{tab_name} Execute")
@@ -77,7 +81,7 @@ with gr.Blocks() as app:
77
  "PROMPT_VERIFY",
78
  [
79
  {"key": "problem", "type": "textbox", "label": "Enter Math Problem", "placeholder": "e.g., Solve for x: 2x + 5 = 15"},
80
- {"key": "solution", "type": "textbox", "label": "Enter Your Solution", "placeholder": "e.g., x = 5"}
81
  ]
82
  )
83
 
 
11
  prompt = os.getenv(prompt_template).format(**kwargs)
12
  # Stream the response from the model
13
  stream = client.chat.completions.create(
14
+ model="Qwen/QwQ-32B-Preview",
15
  messages=[{"role": "user", "content": prompt}],
16
  temperature=0.7,
17
  max_tokens=1024,
 
41
  )
42
  elif inp["type"] == "dropdown":
43
  input_fields.append(
44
+ gr.Dropdown(choices=inp["choices"], label=inp["label"])
45
+ )
46
+ elif inp["type"] == "value":
47
+ input_fields.append(
48
+ gr.Textbox(label=inp["label"], placeholder=inp["placeholder"])
49
  )
50
  # Button and output
51
  button = gr.Button(f"{tab_name} Execute")
 
81
  "PROMPT_VERIFY",
82
  [
83
  {"key": "problem", "type": "textbox", "label": "Enter Math Problem", "placeholder": "e.g., Solve for x: 2x + 5 = 15"},
84
+ {"key": "solution", "type": "value", "label": "Enter Your Solution", "placeholder": "e.g., x = 5"}
85
  ]
86
  )
87