Spaces:
Sleeping
Sleeping
Rohan Kumar Singh
commited on
Commit
·
d8cbae7
1
Parent(s):
7191a40
layout changes
Browse files
app.py
CHANGED
@@ -92,11 +92,16 @@ def generate_response(question):
|
|
92 |
]
|
93 |
|
94 |
return "".join(preds)
|
95 |
-
|
96 |
-
|
|
|
|
|
97 |
import streamlit as st
|
98 |
from streamlit_chat import message
|
99 |
|
|
|
|
|
|
|
100 |
if 'generated' not in st.session_state:
|
101 |
st.session_state['generated'] = []
|
102 |
if 'past' not in st.session_state:
|
@@ -115,9 +120,9 @@ container = st.container()
|
|
115 |
|
116 |
with container:
|
117 |
with st.form(key='my_form', clear_on_submit=True):
|
118 |
-
user_input = st.text_input("You:", key='input')
|
119 |
-
submit_button = st.form_submit_button(label='Send')
|
120 |
-
clear_button = st.button("Clear Conversation", key="clear")
|
121 |
# reset everything
|
122 |
if clear_button:
|
123 |
st.session_state['generated'] = []
|
|
|
92 |
]
|
93 |
|
94 |
return "".join(preds)
|
95 |
+
'''
|
96 |
+
def generate_response(question):
|
97 |
+
return "asd"
|
98 |
+
'''
|
99 |
import streamlit as st
|
100 |
from streamlit_chat import message
|
101 |
|
102 |
+
st.title(":red[_Sarcastic_] Chatbot")
|
103 |
+
st.divider()
|
104 |
+
|
105 |
if 'generated' not in st.session_state:
|
106 |
st.session_state['generated'] = []
|
107 |
if 'past' not in st.session_state:
|
|
|
120 |
|
121 |
with container:
|
122 |
with st.form(key='my_form', clear_on_submit=True):
|
123 |
+
user_input = st.text_input("You:", key='input',placeholder="Disclaimer: Be careful with punctuations like , ? . ! \" and IT WILL CUSS YOU")
|
124 |
+
submit_button = st.form_submit_button(label='Send',use_container_width=True)
|
125 |
+
clear_button = st.button("Clear Conversation", key="clear",use_container_width=True)
|
126 |
# reset everything
|
127 |
if clear_button:
|
128 |
st.session_state['generated'] = []
|