ignore
Browse files- .gitignore +1 -0
- app.py +1 -2
- local_config_example.json +12 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
local_config.json
|
app.py
CHANGED
@@ -17,13 +17,12 @@ OPEN_AI_CLIENT = OpenAI(api_key=OPEN_AI_KEY)
|
|
17 |
GCS_KEY = os.getenv("GOOGLE_APPLICATION_CREDENTIALS_JSON")
|
18 |
GCS_SERVICE = GoogleCloudStorage(GCS_KEY)
|
19 |
GCS_CLIENT = GCS_SERVICE.client
|
20 |
-
bucket_name = '
|
21 |
bucket = GCS_CLIENT.bucket(bucket_name)
|
22 |
|
23 |
GSHEET_KEY = os.getenv("GOOGLE_APPLICATION_CREDENTIALS_JSON")
|
24 |
GSHEET_KEY_DICT = json.loads(GSHEET_KEY)
|
25 |
sheets_client = gspread.service_account_from_dict(GSHEET_KEY_DICT)
|
26 |
-
sheet_url = "your_google_sheets_url"
|
27 |
|
28 |
# 函数定义
|
29 |
def upload_image_to_gcs(image_file, bucket):
|
|
|
17 |
GCS_KEY = os.getenv("GOOGLE_APPLICATION_CREDENTIALS_JSON")
|
18 |
GCS_SERVICE = GoogleCloudStorage(GCS_KEY)
|
19 |
GCS_CLIENT = GCS_SERVICE.client
|
20 |
+
bucket_name = 'ai_question_to_image'
|
21 |
bucket = GCS_CLIENT.bucket(bucket_name)
|
22 |
|
23 |
GSHEET_KEY = os.getenv("GOOGLE_APPLICATION_CREDENTIALS_JSON")
|
24 |
GSHEET_KEY_DICT = json.loads(GSHEET_KEY)
|
25 |
sheets_client = gspread.service_account_from_dict(GSHEET_KEY_DICT)
|
|
|
26 |
|
27 |
# 函数定义
|
28 |
def upload_image_to_gcs(image_file, bucket):
|
local_config_example.json
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"OUTPUT_PATH": "/Users/young/Downloads",
|
3 |
+
"TRANSCRIPTS": [],
|
4 |
+
"CURRENT_INDEX": 0,
|
5 |
+
"VIDEO_ID": "",
|
6 |
+
"PASSWORD": "1234",
|
7 |
+
"OPEN_AI_KEY": "sk-",
|
8 |
+
"GROQ_API_KEY": "",
|
9 |
+
"JUTOR_CHAT_KEY": "",
|
10 |
+
"GOOGLE_APPLICATION_CREDENTIALS_JSON": {
|
11 |
+
}
|
12 |
+
}
|