Update app.py
Browse files
app.py
CHANGED
@@ -32,8 +32,8 @@ class LocalLLM:
|
|
32 |
out = outputs[0] # fallback if it's just a list of strings
|
33 |
else:
|
34 |
out = str(outputs)
|
35 |
-
|
36 |
-
return out
|
37 |
except Exception as e:
|
38 |
print(f"❌ Error in LocalLLM.generate(): {e}")
|
39 |
raise
|
@@ -286,8 +286,8 @@ if __name__ == "__main__":
|
|
286 |
print("-"*(60 + len(" App Starting ")) + "\n")
|
287 |
|
288 |
# Test the agent
|
289 |
-
agent = BasicAgent()
|
290 |
-
agent.agent.run("What is 2+2?")
|
291 |
|
292 |
print("Launching Gradio Interface for Basic Agent Evaluation...")
|
293 |
demo.launch(debug=True, share=False)
|
|
|
32 |
out = outputs[0] # fallback if it's just a list of strings
|
33 |
else:
|
34 |
out = str(outputs)
|
35 |
+
print("🧪 Final object to return:", type(response_text), out[:100])
|
36 |
+
return {'role': 'assistant', 'content': out}
|
37 |
except Exception as e:
|
38 |
print(f"❌ Error in LocalLLM.generate(): {e}")
|
39 |
raise
|
|
|
286 |
print("-"*(60 + len(" App Starting ")) + "\n")
|
287 |
|
288 |
# Test the agent
|
289 |
+
# agent = BasicAgent()
|
290 |
+
# agent.agent.run("What is 2+2?")
|
291 |
|
292 |
print("Launching Gradio Interface for Basic Agent Evaluation...")
|
293 |
demo.launch(debug=True, share=False)
|