Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -92,7 +92,7 @@ def generate_presentation_content_openai(prompt, api_key, progress_bar, progress
|
|
| 92 |
{"role": "user", "content": prompt}
|
| 93 |
],
|
| 94 |
stream=True,
|
| 95 |
-
max_tokens=
|
| 96 |
)
|
| 97 |
|
| 98 |
# Aktualizacja paska postępu i wyświetlanie generowanej treści
|
|
@@ -189,7 +189,7 @@ def get_binary_file_downloader_html(file_path, file_label='File'):
|
|
| 189 |
|
| 190 |
# Główna funkcja aplikacji Streamlit
|
| 191 |
def main():
|
| 192 |
-
st.set_page_config(page_title="Generator Prezentacji
|
| 193 |
|
| 194 |
st.title("🎯 Generator Prezentacji LLM")
|
| 195 |
st.write("Ta aplikacja generuje prezentacje PowerPoint na dowolny temat za pomocą sztucznej inteligencji.")
|
|
@@ -247,6 +247,7 @@ def main():
|
|
| 247 |
content = generate_presentation_content_openai(prompt, api_key, progress_bar, progress_text)
|
| 248 |
else: # DeepSeek
|
| 249 |
content = generate_presentation_content_deepseek(prompt, api_key, progress_bar, progress_text)
|
|
|
|
| 250 |
|
| 251 |
if content:
|
| 252 |
st.success("✅ Treść prezentacji została wygenerowana!")
|
|
|
|
| 92 |
{"role": "user", "content": prompt}
|
| 93 |
],
|
| 94 |
stream=True,
|
| 95 |
+
max_tokens=10000
|
| 96 |
)
|
| 97 |
|
| 98 |
# Aktualizacja paska postępu i wyświetlanie generowanej treści
|
|
|
|
| 189 |
|
| 190 |
# Główna funkcja aplikacji Streamlit
|
| 191 |
def main():
|
| 192 |
+
st.set_page_config(page_title="Generator Prezentacji PPT", layout="wide")
|
| 193 |
|
| 194 |
st.title("🎯 Generator Prezentacji LLM")
|
| 195 |
st.write("Ta aplikacja generuje prezentacje PowerPoint na dowolny temat za pomocą sztucznej inteligencji.")
|
|
|
|
| 247 |
content = generate_presentation_content_openai(prompt, api_key, progress_bar, progress_text)
|
| 248 |
else: # DeepSeek
|
| 249 |
content = generate_presentation_content_deepseek(prompt, api_key, progress_bar, progress_text)
|
| 250 |
+
content = content.replace("\r", "").replace("\n\n---\n\n", "\n\n").replace("\n---\n", "\n").replace("---", "") # usuwanie zbędnych separatorów
|
| 251 |
|
| 252 |
if content:
|
| 253 |
st.success("✅ Treść prezentacji została wygenerowana!")
|