Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,8 @@ login(api_token)
|
|
11 |
|
12 |
# Load LLaMA 3.2 model and tokenizer with the API token
|
13 |
model_name = "meta-llama/Llama-3.2-1B"
|
14 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name,
|
15 |
-
model = AutoModelForCausalLM.from_pretrained(model_name,
|
16 |
|
17 |
# Define the inference function
|
18 |
def generate_text(prompt, max_length=100, temperature=0.7):
|
|
|
11 |
|
12 |
# Load LLaMA 3.2 model and tokenizer with the API token
|
13 |
model_name = "meta-llama/Llama-3.2-1B"
|
14 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, token=api_token)
|
15 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, token=api_token)
|
16 |
|
17 |
# Define the inference function
|
18 |
def generate_text(prompt, max_length=100, temperature=0.7):
|