Musawir19 commited on
Commit
9fce912
·
verified ·
1 Parent(s): 613dd47

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -6,8 +6,9 @@ import faiss
6
  import numpy as np
7
  import streamlit as st
8
 
9
- # Authenticate with Hugging Face using environment variable for API key
10
- login(os.getenv("HF_API_KEY"))
 
11
 
12
  # Initialize a question-answering model
13
  question_answerer = pipeline("question-answering", model="distilbert-base-cased-distilled-squad")
 
6
  import numpy as np
7
  import streamlit as st
8
 
9
+ # Authenticate with Hugging Face using the API key from environment variables
10
+ # If running on Hugging Face Spaces, make sure the API key is stored as a secret.
11
+ login(os.environ["HF_API_KEY"])
12
 
13
  # Initialize a question-answering model
14
  question_answerer = pipeline("question-answering", model="distilbert-base-cased-distilled-squad")