Spaces:
Running
Running
Upload invoke_rss.py
Browse files- invoke_rss.py +23 -0
invoke_rss.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import modal
|
2 |
+
|
3 |
+
|
4 |
+
def get_rss_output(rss):
|
5 |
+
f = modal.Function.lookup("corise-podcast-project", "main")
|
6 |
+
output = f.call(rss, '/podcast/')
|
7 |
+
podcast_info = output
|
8 |
+
podcast_name = podcast_info['podcast_details']['podcast_title']
|
9 |
+
# Process the file data as needed
|
10 |
+
episode_title = podcast_info['podcast_details']['episode_title']
|
11 |
+
episode_image = podcast_info['podcast_details']['episode_image']
|
12 |
+
podcast_summary = podcast_info['podcast_summary']
|
13 |
+
podcast_guest = str(podcast_info['podcast_guest']['podcast_guest'])
|
14 |
+
podcast_guest_org = str(podcast_info['podcast_guest'].get('podcast_guest_org'))
|
15 |
+
podcast_guest_title = str(podcast_info['podcast_guest'].get('podcast_guest_title'))
|
16 |
+
podcast_guest_wikipedia = str(podcast_info['podcast_guest'].get('wikipedia_summary'))
|
17 |
+
podcast_highlights = str(podcast_info['podcast_highlights'])
|
18 |
+
podcast_key_moments = str(podcast_info['key_moments_and_key_topics'])
|
19 |
+
podcast_gpt_transcript = str(podcast_info['gpt_podcast_transcript'])
|
20 |
+
|
21 |
+
return podcast_name, episode_title, episode_image, podcast_summary, podcast_guest, podcast_guest_org, \
|
22 |
+
podcast_guest_title, podcast_guest_wikipedia, podcast_highlights, podcast_key_moments, \
|
23 |
+
podcast_gpt_transcript
|