Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -72,22 +72,6 @@ def main():
|
|
72 |
"""
|
73 |
)
|
74 |
|
75 |
-
d = """ user_input = st.text_input("", key="input")
|
76 |
-
# Initialize session state for generated responses and past messages
|
77 |
-
if "generated" not in st.session_state:
|
78 |
-
st.session_state["generated"] = ["I am ready to help you"]
|
79 |
-
if "past" not in st.session_state:
|
80 |
-
st.session_state["past"] = ["Hey there!"]
|
81 |
-
# Search the database for a response based on user input and update session state
|
82 |
-
if user_input:
|
83 |
-
answer = process_answer({'query': user_input})
|
84 |
-
st.session_state["past"].append(user_input)
|
85 |
-
response = answer
|
86 |
-
st.session_state["generated"].append(response)
|
87 |
-
# Display conversation history using Streamlit messages
|
88 |
-
if st.session_state["generated"]:
|
89 |
-
display_conversation(st.session_state)"""
|
90 |
-
|
91 |
user_input = st.text_input("Question:", placeholder="Ask about your PDF", key='input')
|
92 |
with st.form(key='my_form', clear_on_submit=True):
|
93 |
submit_button = st.form_submit_button(label='Send')
|
|
|
72 |
"""
|
73 |
)
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
user_input = st.text_input("Question:", placeholder="Ask about your PDF", key='input')
|
76 |
with st.form(key='my_form', clear_on_submit=True):
|
77 |
submit_button = st.form_submit_button(label='Send')
|