themissingCRAM
commited on
Commit
·
d17e40b
1
Parent(s):
79dc784
revert back to hfapimodel
Browse files
app.py
CHANGED
|
@@ -4,10 +4,10 @@ import os
|
|
| 4 |
from smolagents import (
|
| 5 |
tool,
|
| 6 |
CodeAgent,
|
| 7 |
-
TransformersModel,
|
| 8 |
GradioUI,
|
| 9 |
MultiStepAgent,
|
| 10 |
-
stream_to_gradio,
|
| 11 |
)
|
| 12 |
from sqlalchemy import (
|
| 13 |
create_engine,
|
|
@@ -120,10 +120,15 @@ def init_db(engine):
|
|
| 120 |
if __name__ == "__main__":
|
| 121 |
engine = create_engine("sqlite:///:localhost:")
|
| 122 |
engine = init_db(engine)
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
)
|
| 128 |
|
| 129 |
agent = CodeAgent(
|
|
|
|
| 4 |
from smolagents import (
|
| 5 |
tool,
|
| 6 |
CodeAgent,
|
| 7 |
+
TransformersModel,
|
| 8 |
GradioUI,
|
| 9 |
MultiStepAgent,
|
| 10 |
+
stream_to_gradio, HfApiModel,
|
| 11 |
)
|
| 12 |
from sqlalchemy import (
|
| 13 |
create_engine,
|
|
|
|
| 120 |
if __name__ == "__main__":
|
| 121 |
engine = create_engine("sqlite:///:localhost:")
|
| 122 |
engine = init_db(engine)
|
| 123 |
+
#Not working at the moment
|
| 124 |
+
# model = TransformersModel(
|
| 125 |
+
# # model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 126 |
+
# device_map="cuda",
|
| 127 |
+
# model_id="meta-llama/Llama-3.2-3B-Instruct"
|
| 128 |
+
# )
|
| 129 |
+
model = HfApiModel(
|
| 130 |
+
model_id="meta-llama/Llama-3.2-3B-Instruct",
|
| 131 |
+
token=os.getenv("my_first_agents_hf_tokens")
|
| 132 |
)
|
| 133 |
|
| 134 |
agent = CodeAgent(
|