Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,7 @@ import subprocess
|
|
6 |
import pandas as pd
|
7 |
import torch, spaces
|
8 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
9 |
-
|
10 |
-
from smolagents.agent import LocalLLM, CodeAgent
|
11 |
from smolagents.message import MessageRole
|
12 |
from huggingface_hub import InferenceClient, hf_hub_download
|
13 |
|
@@ -61,7 +60,7 @@ def check_token_access():
|
|
61 |
|
62 |
# --- Basic Agent Definition ---
|
63 |
# ----- THIS IS WHERE YOU CAN BUILD WHAT YOU WANT ------
|
64 |
-
class BasicAgent
|
65 |
def __init__(self, model_id="meta-llama/Llama-3.1-8B-Instruct", hf_token=None):
|
66 |
print("BasicAgent initialized.")
|
67 |
print("ENV-HF_TOKEN-LEN", len(hf_token), file=sys.stderr)
|
|
|
6 |
import pandas as pd
|
7 |
import torch, spaces
|
8 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
9 |
+
from smolagents import CodeAgent, HfApiModel
|
|
|
10 |
from smolagents.message import MessageRole
|
11 |
from huggingface_hub import InferenceClient, hf_hub_download
|
12 |
|
|
|
60 |
|
61 |
# --- Basic Agent Definition ---
|
62 |
# ----- THIS IS WHERE YOU CAN BUILD WHAT YOU WANT ------
|
63 |
+
class BasicAgent:
|
64 |
def __init__(self, model_id="meta-llama/Llama-3.1-8B-Instruct", hf_token=None):
|
65 |
print("BasicAgent initialized.")
|
66 |
print("ENV-HF_TOKEN-LEN", len(hf_token), file=sys.stderr)
|