shashank970613 commited on
Commit
75e4e99
·
verified ·
1 Parent(s): 056d2a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -2,7 +2,8 @@ import os
2
  import requests
3
  import gradio as gr
4
  import spaces
5
- from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, tool
 
6
 
7
  # 1. Custom tool to download files if needed for tasks
8
  @tool
@@ -24,7 +25,7 @@ def get_file_content_tool(task_id: str) -> str:
24
 
25
  # 2. Initialize model and agent
26
  model = InferenceClientModel(
27
- model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
28
  token=os.getenv("HF_TOKEN")
29
  )
30
 
 
2
  import requests
3
  import gradio as gr
4
  import spaces
5
+ from transformers import pipeline
6
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, TransformersModel, tool
7
 
8
  # 1. Custom tool to download files if needed for tasks
9
  @tool
 
25
 
26
  # 2. Initialize model and agent
27
  model = InferenceClientModel(
28
+ model = TransformersModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct"),
29
  token=os.getenv("HF_TOKEN")
30
  )
31