Spaces:
Runtime error
Runtime error
Auto download Palantir essay
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ import torch
|
|
| 15 |
from huggingface_hub import InferenceClient
|
| 16 |
from kokoro import KModel, KPipeline
|
| 17 |
# -----------------------------------------------------------------------------
|
| 18 |
-
# Get default podcast materials from Daily papers
|
| 19 |
# -----------------------------------------------------------------------------
|
| 20 |
from papers import PaperManager
|
| 21 |
|
|
@@ -24,6 +24,11 @@ top_papers = paper_manager.get_top_content()
|
|
| 24 |
|
| 25 |
PODCAST_SUBJECT = list(top_papers.values())[0]
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
# -----------------------------------------------------------------------------
|
| 28 |
# LLM that writes the script (unchanged)
|
| 29 |
# -----------------------------------------------------------------------------
|
|
|
|
| 15 |
from huggingface_hub import InferenceClient
|
| 16 |
from kokoro import KModel, KPipeline
|
| 17 |
# -----------------------------------------------------------------------------
|
| 18 |
+
# Get default podcast materials, from Daily papers and one download
|
| 19 |
# -----------------------------------------------------------------------------
|
| 20 |
from papers import PaperManager
|
| 21 |
|
|
|
|
| 24 |
|
| 25 |
PODCAST_SUBJECT = list(top_papers.values())[0]
|
| 26 |
|
| 27 |
+
os.makedirs("examples", exist_ok=True)
|
| 28 |
+
response = requests.get("https://www.palantir.com/assets/xrfr7uokpv1b/1wtb4LWF7XIuJisnMwH0XW/dc37fdda646a5df6c5b86f695ce990c0/NYT_-_Our_Oppenheimer_Moment-_The_Creation_of_A.I._Weapons.pdf")
|
| 29 |
+
with open("examples/Essay_Palantir.pdf", 'wb') as f:
|
| 30 |
+
f.write(response.content)
|
| 31 |
+
|
| 32 |
# -----------------------------------------------------------------------------
|
| 33 |
# LLM that writes the script (unchanged)
|
| 34 |
# -----------------------------------------------------------------------------
|