DineshDyne commited on
Commit
913a435
·
1 Parent(s): 51ce215

test script

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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-small"):
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!!!!. Ask the Question.....")
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.text_area(f"{response}")
 
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}")