Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -479,7 +479,9 @@ def divide_prompt(prompt, max_length):
|
|
479 |
chunks.append(' '.join(current_chunk))
|
480 |
return chunks
|
481 |
|
|
|
482 |
# 13. Provide way of saving all and deleting all to give way of reviewing output and saving locally before clearing it
|
|
|
483 |
@st.cache_resource
|
484 |
def create_zip_of_files(files):
|
485 |
zip_name = "all_files.zip"
|
@@ -487,6 +489,7 @@ def create_zip_of_files(files):
|
|
487 |
for file in files:
|
488 |
zipf.write(file)
|
489 |
return zip_name
|
|
|
490 |
@st.cache_resource
|
491 |
def get_zip_download_link(zip_file):
|
492 |
with open(zip_file, 'rb') as f:
|
@@ -678,8 +681,8 @@ def main():
|
|
678 |
# new - llama
|
679 |
response = StreamLLMChatResponse(file_contents)
|
680 |
filename = generate_filename(user_prompt, ".md")
|
681 |
-
create_file(filename, response, '', should_save)
|
682 |
-
addDocumentHTML5(file_contents)
|
683 |
addDocumentHTML5(response)
|
684 |
|
685 |
# old - gpt
|
|
|
479 |
chunks.append(' '.join(current_chunk))
|
480 |
return chunks
|
481 |
|
482 |
+
|
483 |
# 13. Provide way of saving all and deleting all to give way of reviewing output and saving locally before clearing it
|
484 |
+
|
485 |
@st.cache_resource
|
486 |
def create_zip_of_files(files):
|
487 |
zip_name = "all_files.zip"
|
|
|
489 |
for file in files:
|
490 |
zipf.write(file)
|
491 |
return zip_name
|
492 |
+
|
493 |
@st.cache_resource
|
494 |
def get_zip_download_link(zip_file):
|
495 |
with open(zip_file, 'rb') as f:
|
|
|
681 |
# new - llama
|
682 |
response = StreamLLMChatResponse(file_contents)
|
683 |
filename = generate_filename(user_prompt, ".md")
|
684 |
+
#create_file(filename, response, '', should_save)
|
685 |
+
#addDocumentHTML5(file_contents)
|
686 |
addDocumentHTML5(response)
|
687 |
|
688 |
# old - gpt
|