EdwardConstantine commited on
Commit
95a4ca6
·
verified ·
1 Parent(s): 2811a96

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +1 -7
src/streamlit_app.py CHANGED
@@ -147,13 +147,7 @@ class SimpleVectorStore:
147
  # ============== LLM SERVICE ==============
148
  @st.cache_resource
149
  def get_llm_client():
150
- token = os.getenv("HUGGINGFACE_API_KEY", "")
151
- if not token:
152
- try:
153
- token = st.secrets["HUGGINGFACE_API_KEY"]
154
- except:
155
- token = ""
156
- return InferenceClient(model="HuggingFaceH4/zephyr-7b-beta", token=token)
157
 
158
  def generate_answer(question: str, context: str) -> str:
159
  prompt = f"""You are a helpful assistant. Answer based on the context below.
 
147
  # ============== LLM SERVICE ==============
148
  @st.cache_resource
149
  def get_llm_client():
150
+ return InferenceClient(model="HuggingFaceH4/zephyr-7b-beta")
 
 
 
 
 
 
151
 
152
  def generate_answer(question: str, context: str) -> str:
153
  prompt = f"""You are a helpful assistant. Answer based on the context below.