Spaces:
Sleeping
Sleeping
import modal | |
from search_recommend import recommend, get_podcast_title | |
def get_rss_output(rss): | |
f = modal.Function.lookup("corise-podcast-project", "main") | |
output = f.call(rss, '/podcast/') | |
podcast_info = output | |
podcast_name = podcast_info['podcast_details']['podcast_title'] | |
# Process the file data as needed | |
episode_title = podcast_info['podcast_details']['episode_title'] | |
episode_image = podcast_info['podcast_details']['episode_image'] | |
podcast_summary = podcast_info['podcast_summary'] | |
podcast_guest = str(podcast_info['podcast_guest']['podcast_guest']) | |
podcast_guest_org = str(podcast_info['podcast_guest'].get('podcast_guest_org')) | |
podcast_guest_title = str(podcast_info['podcast_guest'].get('podcast_guest_title')) | |
podcast_guest_wikipedia = str(podcast_info['podcast_guest'].get('wikipedia_summary')) | |
podcast_highlights = str(podcast_info['podcast_highlights']) | |
podcast_key_moments = str(podcast_info['key_moments_and_key_topics']) | |
podcast_gpt_transcript = str(podcast_info['gpt_podcast_transcript']) | |
return podcast_name, episode_title, episode_image, podcast_summary, podcast_guest, podcast_guest_org, \ | |
podcast_guest_title, podcast_guest_wikipedia, podcast_highlights, podcast_key_moments, \ | |
podcast_gpt_transcript | |
def get_recommendations(podcast_id, normal_chatbot): | |
recommend_string = recommend(podcast_id) | |
podcast_title = get_podcast_title(podcast_id) | |
normal_chatbot.append((podcast_title,recommend_string)) | |
return normal_chatbot | |