Spaces:
Runtime error
Runtime error
Commit
·
913a435
1
Parent(s):
51ce215
test script
Browse files
app.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
from langchain import HuggingFaceHub
|
| 3 |
|
| 4 |
|
| 5 |
-
def get_answer(question,model_name="google/flan-t5-
|
| 6 |
model=HuggingFaceHub(repo_id=model_name)
|
| 7 |
return model(question)
|
| 8 |
|
|
@@ -13,7 +13,7 @@ st.set_page_config(
|
|
| 13 |
|
| 14 |
)
|
| 15 |
|
| 16 |
-
st.header("Do It
|
| 17 |
|
| 18 |
question=st.text_input("Question:")
|
| 19 |
|
|
@@ -24,4 +24,4 @@ if submit:
|
|
| 24 |
with st.spinner("In progress..."):
|
| 25 |
response=get_answer(question)
|
| 26 |
st.subheader("Response")
|
| 27 |
-
st.
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
from langchain.llms import HuggingFaceHub
|
| 3 |
|
| 4 |
|
| 5 |
+
def get_answer(question,model_name="google/flan-t5-large"):
|
| 6 |
model=HuggingFaceHub(repo_id=model_name)
|
| 7 |
return model(question)
|
| 8 |
|
|
|
|
| 13 |
|
| 14 |
)
|
| 15 |
|
| 16 |
+
st.header("Do It!!!! Ask the Question.....")
|
| 17 |
|
| 18 |
question=st.text_input("Question:")
|
| 19 |
|
|
|
|
| 24 |
with st.spinner("In progress..."):
|
| 25 |
response=get_answer(question)
|
| 26 |
st.subheader("Response")
|
| 27 |
+
st.write(f"{response}")
|