keynes42 commited on
Commit
b6510e1
·
verified ·
1 Parent(s): f6b849c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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
- # print(f"🧪 Final output string: {out[:100]}")
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)