-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
27 lines (22 loc) · 834 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import time
start_time = time.time()
import os
from dotenv import load_dotenv
from llama_cpp import Llama, LlamaGrammar
from youtube_metadata import YouTubeMetadataFetcher # Assuming this class is in youtube_metadata_fetcher.py
from recipe_extractor import RecipeExtractor
from restaurant_extractor import RestaurantExtractor
# Load environment variables from .env file
load_dotenv()
# Get the API key from environment variables
api_key = os.getenv("YOUTUBE_API_KEY")
# Initialize the YouTubeMetadataFetcher class
fetcher = YouTubeMetadataFetcher(api_key)
# Example usage
if __name__ == "__main__":
recipe_video_id = "qWbHSOplcvY"
# extractor = RecipeExtractor(recipe_video_id)
# extractor.run()
restaurant_video_id = "wu1fOmsPEr8"
extractor = RestaurantExtractor(restaurant_video_id)
extractor.run()