Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,14 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import torch
|
| 3 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
# Define model path on Hugging Face Hub
|
| 6 |
model_name = "Somya1834/fc-deepseek-finetuned-50" # Replace with your repo
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import torch
|
| 3 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 4 |
+
import os
|
| 5 |
+
from huggingface_hub import login
|
| 6 |
+
|
| 7 |
+
# Get the token securely from Hugging Face secrets
|
| 8 |
+
hf_token = os.getenv("HF_TOKEN")
|
| 9 |
+
|
| 10 |
+
# Authenticate with the token
|
| 11 |
+
login(token=hf_token)
|
| 12 |
|
| 13 |
# Define model path on Hugging Face Hub
|
| 14 |
model_name = "Somya1834/fc-deepseek-finetuned-50" # Replace with your repo
|