InnaV commited on
Commit
6660a17
·
verified ·
1 Parent(s): 9558bb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -31,7 +31,7 @@ def my_custom_tool(text:str, arg2:int)-> str: #it's import to specify the return
31
  topic_words = ' '.join(topic_words)
32
 
33
  except Exception as e:
34
- return f"Error fetching time for timezone '{timezone}': {str(e)}"
35
 
36
  return "Here is the topic of the text: ", topic_words
37
 
@@ -53,9 +53,6 @@ def get_current_time_in_timezone(timezone: str) -> str:
53
 
54
  final_answer = FinalAnswerTool()
55
 
56
- # 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:
57
- # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
58
-
59
  model = HfApiModel(
60
  max_tokens=2096,
61
  temperature=0.5,
@@ -63,7 +60,6 @@ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may
63
  custom_role_conversions=None,
64
  )
65
 
66
-
67
  # Import tool from Hub
68
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
69
 
@@ -82,5 +78,4 @@ agent = CodeAgent(
82
  prompt_templates=prompt_templates
83
  )
84
 
85
-
86
  GradioUI(agent).launch()
 
31
  topic_words = ' '.join(topic_words)
32
 
33
  except Exception as e:
34
+ return f"Error fetching the topic of the text}"
35
 
36
  return "Here is the topic of the text: ", topic_words
37
 
 
53
 
54
  final_answer = FinalAnswerTool()
55
 
 
 
 
56
  model = HfApiModel(
57
  max_tokens=2096,
58
  temperature=0.5,
 
60
  custom_role_conversions=None,
61
  )
62
 
 
63
  # Import tool from Hub
64
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
65
 
 
78
  prompt_templates=prompt_templates
79
  )
80
 
 
81
  GradioUI(agent).launch()