Spaces:
Sleeping
Sleeping
Update app.py
#1
by
Muktibhuyan
- opened
app.py
CHANGED
@@ -210,9 +210,15 @@ def create_interface():
|
|
210 |
return f"β Download failed:\n{download_message}", gr.File(visible=False), gr.Button(visible=False), None
|
211 |
|
212 |
def show_analysis(video_info):
|
|
|
213 |
if video_info:
|
214 |
-
|
215 |
-
|
|
|
|
|
|
|
|
|
|
|
216 |
|
217 |
download_btn.click(handle_download, inputs=[url_input, cookies_input], outputs=[status_output, file_output, analysis_btn, video_info_state])
|
218 |
analysis_btn.click(show_analysis, inputs=[video_info_state], outputs=[analysis_output])
|
|
|
210 |
return f"β Download failed:\n{download_message}", gr.File(visible=False), gr.Button(visible=False), None
|
211 |
|
212 |
def show_analysis(video_info):
|
213 |
+
print(f"[DEBUG] Video info received: {video_info is not None}")
|
214 |
if video_info:
|
215 |
+
print(f"[DEBUG] Video title: {video_info.get('title', 'No title')}")
|
216 |
+
analysis_text = downloader.format_video_info(video_info)
|
217 |
+
print(f"[DEBUG] Analysis text length: {len(analysis_text)}")
|
218 |
+
return gr.Textbox(value=analysis_text, visible=True, lines=20)
|
219 |
+
else:
|
220 |
+
print("[DEBUG] No video info available")
|
221 |
+
return gr.Textbox(value="β No analysis data available.", visible=True, lines=20)
|
222 |
|
223 |
download_btn.click(handle_download, inputs=[url_input, cookies_input], outputs=[status_output, file_output, analysis_btn, video_info_state])
|
224 |
analysis_btn.click(show_analysis, inputs=[video_info_state], outputs=[analysis_output])
|