Spaces:
Build error
Build error
ranchaya commited on
Commit ·
06a07e3
1
Parent(s): d18719e
modify secret key
Browse files
app.py
CHANGED
|
@@ -7,10 +7,10 @@ from langchain.chains.question_answering import load_qa_chain
|
|
| 7 |
import streamlit as st
|
| 8 |
from langchain.chains import RetrievalQA
|
| 9 |
import os
|
| 10 |
-
# HF_TOKEN = os.environ.get("API_TOKEN")
|
| 11 |
query = st.text_input("Ask a question: ")
|
| 12 |
@st.cache_resource
|
| 13 |
def llm():
|
|
|
|
| 14 |
return HuggingFaceHub(repo_id="google/flan-t5-small", model_kwargs={"temperature":0,"max_length":200}, huggingfacehub_api_token=os.environ("API_TOKEN")) # type: ignore
|
| 15 |
@st.cache_resource
|
| 16 |
def qa(query):
|
|
|
|
| 7 |
import streamlit as st
|
| 8 |
from langchain.chains import RetrievalQA
|
| 9 |
import os
|
|
|
|
| 10 |
query = st.text_input("Ask a question: ")
|
| 11 |
@st.cache_resource
|
| 12 |
def llm():
|
| 13 |
+
os.environ.get()
|
| 14 |
return HuggingFaceHub(repo_id="google/flan-t5-small", model_kwargs={"temperature":0,"max_length":200}, huggingfacehub_api_token=os.environ("API_TOKEN")) # type: ignore
|
| 15 |
@st.cache_resource
|
| 16 |
def qa(query):
|