Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -96,7 +96,7 @@ def initialize_model():
|
|
96 |
|
97 |
# Configure generation parameters
|
98 |
generation_config = GenerationConfig(
|
99 |
-
max_new_tokens=
|
100 |
temperature=0.7,
|
101 |
top_p=0.9,
|
102 |
do_sample=True,
|
@@ -147,7 +147,7 @@ class PodcastGenerator:
|
|
147 |
|
148 |
add_log(f"✅ PDF extraction complete. Text length: {len(text)} characters")
|
149 |
return text.strip()
|
150 |
-
|
151 |
except Exception as e:
|
152 |
error_msg = f"❌ PDF extraction failed: {str(e)}"
|
153 |
add_log(error_msg)
|
@@ -376,7 +376,7 @@ Example JSON structure:
|
|
376 |
|
377 |
if progress:
|
378 |
progress(0.5, "✅ Script generated successfully!")
|
379 |
-
|
380 |
add_log(f"✅ Final script has {len(result.get('podcast', []))} lines")
|
381 |
return result
|
382 |
|
|
|
96 |
|
97 |
# Configure generation parameters
|
98 |
generation_config = GenerationConfig(
|
99 |
+
max_new_tokens=4095, # Reduced for stability
|
100 |
temperature=0.7,
|
101 |
top_p=0.9,
|
102 |
do_sample=True,
|
|
|
147 |
|
148 |
add_log(f"✅ PDF extraction complete. Text length: {len(text)} characters")
|
149 |
return text.strip()
|
150 |
+
|
151 |
except Exception as e:
|
152 |
error_msg = f"❌ PDF extraction failed: {str(e)}"
|
153 |
add_log(error_msg)
|
|
|
376 |
|
377 |
if progress:
|
378 |
progress(0.5, "✅ Script generated successfully!")
|
379 |
+
add_log(f"📄 Full generated text:\n{generated_text}")
|
380 |
add_log(f"✅ Final script has {len(result.get('podcast', []))} lines")
|
381 |
return result
|
382 |
|