Rausda6 commited on
Commit
2054de4
·
verified ·
1 Parent(s): ac28e38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -275,13 +275,13 @@ class PodcastGenerator:
275
  if len(extracted_text) > 2000:
276
  extracted_text = extracted_text[:2000] + "..."
277
  add_log("✂️ Text truncated to 2000 characters")
278
- prompt = f"Create a professional podcast discussion, where two experts discuss about this content: {extracted_text}"
279
  elif file_obj.endswith('.txt'):
280
  with open(file_obj, 'r', encoding='utf-8') as f:
281
  file_content = f.read()
282
  if len(file_content) > 2000:
283
  file_content = file_content[:2000] + "..."
284
- prompt = f"Create a professional podcast discussion, where two experts discuss about this content: {file_content}"
285
 
286
  except Exception as e:
287
  add_log(f"⚠️ File processing error: {e}")
@@ -320,7 +320,7 @@ Example JSON structure:
320
  """
321
  user_prompt = f"\nTopic: {prompt}\nJSON:"
322
  full_prompt = system_prompt + user_prompt
323
-
324
 
325
  try:
326
  if progress:
 
275
  if len(extracted_text) > 2000:
276
  extracted_text = extracted_text[:2000] + "..."
277
  add_log("✂️ Text truncated to 2000 characters")
278
+ prompt = extracted_text
279
  elif file_obj.endswith('.txt'):
280
  with open(file_obj, 'r', encoding='utf-8') as f:
281
  file_content = f.read()
282
  if len(file_content) > 2000:
283
  file_content = file_content[:2000] + "..."
284
+ prompt = file_content
285
 
286
  except Exception as e:
287
  add_log(f"⚠️ File processing error: {e}")
 
320
  """
321
  user_prompt = f"\nTopic: {prompt}\nJSON:"
322
  full_prompt = system_prompt + user_prompt
323
+ add_log("🔍 Prompt Preview:\n" + full_prompt[:1000])
324
 
325
  try:
326
  if progress: