rajkumar218 commited on
Commit
f31dbb7
·
verified ·
1 Parent(s): ae7a494

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -3,10 +3,8 @@ import datetime
3
  import requests
4
  import pytz
5
  import yaml
6
- from tools.final_answer import FinalAnswerTool
7
-
8
- from Gradio_UI import GradioUI
9
-
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
  def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
@@ -34,11 +32,9 @@ def get_current_time_in_timezone(timezone: str) -> str:
34
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
 
37
- final_answer = FinalAnswerTool()
38
 
39
- # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
40
- # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
41
 
 
42
  model = HfApiModel(
43
  max_tokens=2096,
44
  temperature=0.5,
@@ -66,4 +62,4 @@ agent = CodeAgent(
66
  )
67
 
68
 
69
- GradioUI(agent).launch()
 
3
  import requests
4
  import pytz
5
  import yaml
6
+ from tools.finalanswertool import FinalAnswerTool
7
+ import gradio as gr
 
 
8
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
9
  @tool
10
  def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
 
32
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
33
 
34
 
 
35
 
 
 
36
 
37
+ final_answer = FinalAnswerTool()
38
  model = HfApiModel(
39
  max_tokens=2096,
40
  temperature=0.5,
 
62
  )
63
 
64
 
65
+ gr.Interface(agent).launch()