Mattral commited on
Commit
b88e8f9
·
verified ·
1 Parent(s): a14d5a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ from dotenv import load_dotenv
5
 
6
  # Load environment variables
7
  load_dotenv()
8
- api_key = os.getenv("api_key")
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=api_key)
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}")