HemanM commited on
Commit
c67fe91
Β·
verified Β·
1 Parent(s): ac8c35d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -59,10 +59,19 @@ def clear_fn():
59
  # πŸ“ˆ Live retrain
60
  def retrain_model():
61
  try:
62
- subprocess.run(["python", "retrain_from_feedback.py"], check=True)
 
 
 
 
 
 
63
  return "βœ… Evo retrained successfully."
64
- except Exception as e:
65
- return f"❌ Retraining failed: {str(e)}"
 
 
 
66
 
67
  # 🌐 Gradio UI
68
  with gr.Blocks(title="EvoRAG – Real-Time Adaptive Reasoning AI") as demo:
 
59
  # πŸ“ˆ Live retrain
60
  def retrain_model():
61
  try:
62
+ result = subprocess.run(
63
+ ["python", "retrain_from_feedback.py"],
64
+ check=True,
65
+ capture_output=True,
66
+ text=True
67
+ )
68
+ print(result.stdout) # Log to terminal
69
  return "βœ… Evo retrained successfully."
70
+ except subprocess.CalledProcessError as e:
71
+ print("STDOUT:", e.stdout)
72
+ print("STDERR:", e.stderr)
73
+ return f"❌ Retraining failed:\n{e.stderr}"
74
+
75
 
76
  # 🌐 Gradio UI
77
  with gr.Blocks(title="EvoRAG – Real-Time Adaptive Reasoning AI") as demo: