Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from langchain.llms import HuggingFaceHub
|
|
4 |
|
5 |
def load_answers(question):
|
6 |
llm = HuggingFaceHub(repo_id="google/flan-t5-large")
|
7 |
-
answer = llm(question)
|
8 |
return answer
|
9 |
|
10 |
st.set_page_config(page_title="LangChain LLM LAB", page_icon="π")
|
|
|
4 |
|
5 |
def load_answers(question):
|
6 |
llm = HuggingFaceHub(repo_id="google/flan-t5-large")
|
7 |
+
answer = llm(question, options={"use_gpu": False, "use_cache": False}, parameters={"return_full_text": False, "num_return_sequences": 1, "temperature": 1.0, "top_p": 0.9, "max_new_tokens": 250})
|
8 |
return answer
|
9 |
|
10 |
st.set_page_config(page_title="LangChain LLM LAB", page_icon="π")
|