Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from dotenv import load_dotenv
|
|
5 |
|
6 |
# Load environment variables
|
7 |
load_dotenv()
|
8 |
-
|
9 |
|
10 |
# App title and description
|
11 |
st.title("I am Your GrowBuddy 🌱")
|
@@ -15,7 +15,7 @@ st.write("Let me help you start gardening. Let's grow together!")
|
|
15 |
def load_pipeline():
|
16 |
try:
|
17 |
# Create the text-generation pipeline using the model from Hugging Face
|
18 |
-
pipe = pipeline("text-generation", model="TheSheBots/UrbanGardening", use_auth_token=
|
19 |
return pipe
|
20 |
except Exception as e:
|
21 |
st.error(f"Failed to load model pipeline: {e}")
|
|
|
5 |
|
6 |
# Load environment variables
|
7 |
load_dotenv()
|
8 |
+
HF_TOKEN = os.getenv("HF_TOKEN")
|
9 |
|
10 |
# App title and description
|
11 |
st.title("I am Your GrowBuddy 🌱")
|
|
|
15 |
def load_pipeline():
|
16 |
try:
|
17 |
# Create the text-generation pipeline using the model from Hugging Face
|
18 |
+
pipe = pipeline("text-generation", model="TheSheBots/UrbanGardening", use_auth_token=HF_TOKEN)
|
19 |
return pipe
|
20 |
except Exception as e:
|
21 |
st.error(f"Failed to load model pipeline: {e}")
|