Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -59,10 +59,19 @@ def clear_fn():
|
|
59 |
# π Live retrain
|
60 |
def retrain_model():
|
61 |
try:
|
62 |
-
subprocess.run(
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
return "β
Evo retrained successfully."
|
64 |
-
except
|
65 |
-
|
|
|
|
|
|
|
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:
|