Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- 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 |
-
|
| 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.
|