zerito commited on
Commit
ee6bccd
·
verified ·
1 Parent(s): 7d828c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -31,10 +31,16 @@ def get_btc_news() -> Dict[str, Any]:
31
  return {"news": news}
32
  else:
33
  return {"error": "Failed to fetch BTC news"}
34
-
35
  @tool
36
  def analyze_btc_news(news: str) -> str:
37
- """Analyzes the provided Bitcoin news content using the Qwen AI model."""
 
 
 
 
 
 
 
38
  model = HfApiModel(
39
  max_tokens=1048,
40
  temperature=0.5,
@@ -44,6 +50,7 @@ def analyze_btc_news(news: str) -> str:
44
  analysis = model.generate(f"Analyze the following Bitcoin news: {news}")
45
  return analysis
46
 
 
47
  final_answer = FinalAnswerTool()
48
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
49
 
 
31
  return {"news": news}
32
  else:
33
  return {"error": "Failed to fetch BTC news"}
 
34
  @tool
35
  def analyze_btc_news(news: str) -> str:
36
+ """Analyzes the provided Bitcoin news content using the Qwen AI model.
37
+
38
+ Args:
39
+ news (str): The Bitcoin news content to analyze.
40
+
41
+ Returns:
42
+ str: The analysis result of the provided Bitcoin news.
43
+ """
44
  model = HfApiModel(
45
  max_tokens=1048,
46
  temperature=0.5,
 
50
  analysis = model.generate(f"Analyze the following Bitcoin news: {news}")
51
  return analysis
52
 
53
+
54
  final_answer = FinalAnswerTool()
55
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
56