Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,11 @@ import yaml
|
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
import json
|
8 |
from Gradio_UI import GradioUI
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
duckduckgo_tool=DuckDuckGoSearchTool()
|
11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
@@ -78,7 +83,7 @@ final_answer = FinalAnswerTool()
|
|
78 |
model = HfApiModel(
|
79 |
max_tokens=2096,
|
80 |
temperature=0.5,
|
81 |
-
model_id='
|
82 |
custom_role_conversions=None,
|
83 |
)
|
84 |
|
|
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
import json
|
8 |
from Gradio_UI import GradioUI
|
9 |
+
# Load model directly
|
10 |
+
from transformers import AutoProcessor, AutoModel
|
11 |
+
|
12 |
+
processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-Omni-3B")
|
13 |
+
model = AutoModel.from_pretrained("Qwen/Qwen2.5-Omni-3B")
|
14 |
|
15 |
duckduckgo_tool=DuckDuckGoSearchTool()
|
16 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
|
|
83 |
model = HfApiModel(
|
84 |
max_tokens=2096,
|
85 |
temperature=0.5,
|
86 |
+
model_id= 'Qwen/Qwen2.5-Omni-3B',# it is possible that this model may be overloaded
|
87 |
custom_role_conversions=None,
|
88 |
)
|
89 |
|