Spaces:
Runtime error
Runtime error
Remove top paper's specific prompt message by default
#1
by
jorvarea
- opened
app.py
CHANGED
|
@@ -45,8 +45,7 @@ def generate_podcast_script(subject: str, steering_question: str | None = None)
|
|
| 45 |
"""Ask the LLM for a script of a podcast given by two hosts."""
|
| 46 |
messages = [
|
| 47 |
{"role": "system", "content": SYSTEM_PROMPT},
|
| 48 |
-
{"role": "user", "content": f"""Here is the topic:
|
| 49 |
-
{subject[:10000]}"""},
|
| 50 |
]
|
| 51 |
if steering_question and len(steering_question) > 0:
|
| 52 |
messages.append({"role": "user", "content": f"You could focus on this question: {steering_question}"})
|
|
@@ -87,7 +86,7 @@ def generate_podcast(url: str, pdf_path: str, topic: str):
|
|
| 87 |
response = requests.get(f'https://r.jina.ai/{url}')
|
| 88 |
material_text = response.text
|
| 89 |
else:
|
| 90 |
-
material_text = PODCAST_SUBJECT
|
| 91 |
|
| 92 |
# Generate podcast script!
|
| 93 |
podcast_script = generate_podcast_script(material_text, topic)
|
|
|
|
| 45 |
"""Ask the LLM for a script of a podcast given by two hosts."""
|
| 46 |
messages = [
|
| 47 |
{"role": "system", "content": SYSTEM_PROMPT},
|
| 48 |
+
{"role": "user", "content": f"""Here is the topic: {subject[:10000]}"""},
|
|
|
|
| 49 |
]
|
| 50 |
if steering_question and len(steering_question) > 0:
|
| 51 |
messages.append({"role": "user", "content": f"You could focus on this question: {steering_question}"})
|
|
|
|
| 86 |
response = requests.get(f'https://r.jina.ai/{url}')
|
| 87 |
material_text = response.text
|
| 88 |
else:
|
| 89 |
+
material_text = "It's the top trending paper on Hugging Face daily papers today. You will need to analyze it by bringing profound insights." + PODCAST_SUBJECT
|
| 90 |
|
| 91 |
# Generate podcast script!
|
| 92 |
podcast_script = generate_podcast_script(material_text, topic)
|