Spaces:
Build error
Build error
Commit
·
eddde63
1
Parent(s):
59368b0
Update app.py
Browse files
app.py
CHANGED
@@ -150,6 +150,16 @@ def main():
|
|
150 |
|
151 |
|
152 |
user_prompt = st.text_area("Enter prompts, instructions & questions:", '', height=100)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
|
154 |
collength, colupload = st.columns([2,3]) # adjust the ratio as needed
|
155 |
with collength:
|
@@ -187,15 +197,7 @@ def main():
|
|
187 |
create_file(filename, user_prompt, response)
|
188 |
st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
189 |
|
190 |
-
|
191 |
-
st.write('Reasoning with your inputs...')
|
192 |
-
response = chat_with_model(user_prompt, ''.join(list(document_sections)))
|
193 |
-
st.write('Response:')
|
194 |
-
st.write(response)
|
195 |
-
|
196 |
-
filename = generate_filename(user_prompt, choice)
|
197 |
-
create_file(filename, user_prompt, response)
|
198 |
-
st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
199 |
|
200 |
all_files = glob.glob("*.*")
|
201 |
all_files = [file for file in all_files if len(os.path.splitext(file)[0]) >= 20] # exclude files with short names
|
|
|
150 |
|
151 |
|
152 |
user_prompt = st.text_area("Enter prompts, instructions & questions:", '', height=100)
|
153 |
+
|
154 |
+
if st.button('💬 Chat'):
|
155 |
+
st.write('Reasoning with your inputs...')
|
156 |
+
response = chat_with_model(user_prompt, ''.join(list(document_sections)))
|
157 |
+
st.write('Response:')
|
158 |
+
st.write(response)
|
159 |
+
|
160 |
+
filename = generate_filename(user_prompt, choice)
|
161 |
+
create_file(filename, user_prompt, response)
|
162 |
+
st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
163 |
|
164 |
collength, colupload = st.columns([2,3]) # adjust the ratio as needed
|
165 |
with collength:
|
|
|
197 |
create_file(filename, user_prompt, response)
|
198 |
st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
199 |
|
200 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
|
202 |
all_files = glob.glob("*.*")
|
203 |
all_files = [file for file in all_files if len(os.path.splitext(file)[0]) >= 20] # exclude files with short names
|