MasteredUltraInstinct commited on
Commit
0ae7b15
Β·
verified Β·
1 Parent(s): d8f8d73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -169,7 +169,10 @@ def solve_polynomial(image, llm_url):
169
  except Exception as e:
170
  return f"❌ **Error**: {str(e)}", "", ""
171
 
172
- # Gradio UI
 
 
 
173
  with gr.Blocks() as demo:
174
  llm_url = gr.Textbox(label="πŸ”— Enter LLM Microservice URL (from Colab)", placeholder="https://xxxx.ngrok-free.app")
175
  image_input = gr.Image(type="pil", label="πŸ“· Upload Image of Polynomial")
@@ -186,6 +189,6 @@ with gr.Blocks() as demo:
186
  demo.title = "🧠 Polynomial Solver from Image"
187
  demo.description = "Upload a polynomial image (typed or handwritten). View symbolic steps and human-style explanation."
188
 
189
-
190
  if __name__ == "__main__":
191
  demo.launch()
 
 
169
  except Exception as e:
170
  return f"❌ **Error**: {str(e)}", "", ""
171
 
172
+ def wrapped_solver(img, url):
173
+ result, cleaned, _ = solve_polynomial(img, url)
174
+ return result, cleaned
175
+
176
  with gr.Blocks() as demo:
177
  llm_url = gr.Textbox(label="πŸ”— Enter LLM Microservice URL (from Colab)", placeholder="https://xxxx.ngrok-free.app")
178
  image_input = gr.Image(type="pil", label="πŸ“· Upload Image of Polynomial")
 
189
  demo.title = "🧠 Polynomial Solver from Image"
190
  demo.description = "Upload a polynomial image (typed or handwritten). View symbolic steps and human-style explanation."
191
 
 
192
  if __name__ == "__main__":
193
  demo.launch()
194
+