Update app.py
Browse files
app.py
CHANGED
@@ -286,7 +286,13 @@ def update_output(n_clicks, git_provider, repo_url, guide_type, exclude_folders)
|
|
286 |
thread.start()
|
287 |
thread.join()
|
288 |
|
289 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
|
291 |
@app.callback(
|
292 |
Output("download-docx-file", "data"),
|
|
|
286 |
thread.start()
|
287 |
thread.join()
|
288 |
|
289 |
+
# Convert the guide_text to a format that can be displayed in the Dash app
|
290 |
+
if guide_text:
|
291 |
+
preview_content = html.Pre(guide_text, style={"whiteSpace": "pre-wrap", "wordBreak": "break-word"})
|
292 |
+
else:
|
293 |
+
preview_content = "No content generated."
|
294 |
+
|
295 |
+
return preview_content, 0, 0 # Return the preview content and reset n_clicks for download buttons
|
296 |
|
297 |
@app.callback(
|
298 |
Output("download-docx-file", "data"),
|