Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- app.py +17 -0
- requirements.txt +1 -0
app.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
def get_text(): #from the UI App
|
4 |
+
input_text = st.text_input("Enter a question: ", key="input")
|
5 |
+
return input_text
|
6 |
+
|
7 |
+
#UIApp starts here
|
8 |
+
st.set_page_config(page_title="LangChain Demo - Simple Question Answering App", page_icon=":robot:")
|
9 |
+
st.header("Simple Question Answering App")
|
10 |
+
|
11 |
+
user_input=get_text()
|
12 |
+
response=load_answer(user_input)
|
13 |
+
|
14 |
+
submit=st.button('Generate')
|
15 |
+
if submit:
|
16 |
+
st.subheader("Answer: ")
|
17 |
+
st.write(response)
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Streamlit
|