Spaces:
Sleeping
Sleeping
spedrox-sac
commited on
Commit
•
54779db
1
Parent(s):
abf2cc3
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,14 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
# Initialize the text generation pipeline with optimizations
|
5 |
pipe = pipeline(
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
+
from huggingface_hub import login
|
4 |
+
import os
|
5 |
+
from dotenv import load_dotenv
|
6 |
+
|
7 |
+
# Replace 'your_token_here' with your actual Hugging Face token
|
8 |
+
token = os.getenv('hf_token')
|
9 |
+
|
10 |
+
# Log in using the token
|
11 |
+
login(token)
|
12 |
|
13 |
# Initialize the text generation pipeline with optimizations
|
14 |
pipe = pipeline(
|