sabonzo commited on
Commit
e8deb6a
·
verified ·
1 Parent(s): 7cb9b40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -21
app.py CHANGED
@@ -115,25 +115,5 @@ agent = CodeAgent(
115
  prompt_templates=prompt_templates
116
  )
117
 
118
- def run_agent():
119
- # Sample interaction: Get user input and use the agent to process it
120
- print("Welcome! Type a prompt for the agent:")
121
- user_input = input("Your prompt: ")
122
- #user_input = "What is the text of sura 113?"
123
 
124
- # Ensure user input is a valid string
125
- if not isinstance(user_input, str) or not user_input.strip():
126
- print("Invalid input. Please provide a non-empty string.")
127
- return
128
-
129
- # Here you can map user_input to your tools if necessary, or you can let the agent decide
130
- try:
131
- response = agent.run(user_input)
132
- except Exception as e:
133
- print(f"Error while running agent: {e}")
134
- return
135
-
136
- print("\nAgent's response:")
137
- print(response)
138
- if __name__ == "__main__":
139
- run_agent()
 
115
  prompt_templates=prompt_templates
116
  )
117
 
 
 
 
 
 
118
 
119
+ GradioUI(agent).launch()