Setting Up
Getting Started
- Clone the GitHub project to your local setup
git clone https://github.com/yizhouzhao/LLM4SocialMedia
- Set up a virtual Python environment named testyml
conda env create -f environment.yml
-
Make sure you are connected to the internet and have the default browser logged into TikTok/YouTube/Instagram accounts.
-
Make sure your browser is not in full-screen mode.
Set your own configurations
Based on different resolutions, you need to set your own coordinates for the screenshot to be taken. - Navigate to main.py
manual_coordinate_adjustment(TikTok())
This function prints out the current x and y coordinates of your mouse. Move your mouse around and put them in the position of the top left coordinate and bottom right, entry point, and record them down.
Input the xy coordinate into Codes/config.py, and put in your own coordinates
TIKTOK_CONFIG = {
"top_left": [Your_own_coordinate_here,Your_own_coordinate_here],
"bottom_right": [Your_own_coordinate_here,Your_own_coordinate_here],
"entry_point": [Your_own_coordinate_here,Your_own_coordinate_here],
"idle_point": [Your_own_coordinate_here,Your_own_coordinate_here],
"next_video": [Your_own_coordinate_here,Your_own_coordinate_here],
}

Do this for all the platforms: YouTube, TikTok, and Instagram that you want to investigate.
Get your own APIs
in the file code/.env, type in the APIs
OPENAI_KEY = Your_own_API_key_here
GOOGLE_API_KEY = Your_own_API_key_here
REPLICATE_API_TOKEN = Your_own_API_key_here
DASHSCOPE_API_KEY = Your_own_API_key_here
🛠️ How to Obtain Each API Key
-
OpenAI API Key:
Sign in to your OpenAI account, navigate to the API Keys section, and click "Create new secret key". -
Google API Key:
Visit the Google Cloud Console, create a new project or select an existing one, enable the necessary APIs, and generate an API key under the "Credentials" section. -
Replicate API Token:
Log in to your Replicate account, go to the API Tokens section, and click "Create token" to generate a new API token. -
DashScope API Key:
Access the DashScope dashboard, navigate to the API Key section, and create a new API key.