Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
import streamlit as st
|
2 |
import requests
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
# Load the Llama model and tokenizer (replace with actual model name in Hugging Face Model Hub)
|
6 |
model_name = "meta-llama/Llama-3.2" # Adjust to the actual model path if needed
|
|
|
1 |
import streamlit as st
|
2 |
import requests
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
4 |
+
from huggingface_hub import login # Import the login function
|
5 |
+
|
6 |
+
# Authenticate with Hugging Face using your token
|
7 |
+
hf_token = "HF_TOKEN" # Replace with your actual Hugging Face API token
|
8 |
+
login(hf_token) # Log in to Hugging Face with the provided token
|
9 |
|
10 |
# Load the Llama model and tokenizer (replace with actual model name in Hugging Face Model Hub)
|
11 |
model_name = "meta-llama/Llama-3.2" # Adjust to the actual model path if needed
|