seawolf2357 commited on
Commit
614a701
·
verified ·
1 Parent(s): b98c4fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -3,7 +3,6 @@ import logging
3
  import os
4
  import re
5
  import asyncio
6
- import json
7
  import subprocess
8
  from huggingface_hub import InferenceClient
9
  from googleapiclient.discovery import build
@@ -45,12 +44,12 @@ if not creds or not creds.valid:
45
  creds.refresh(Request())
46
  else:
47
  flow = InstalledAppFlow.from_client_secrets_file(credentials_path, SCOPES)
48
- creds = flow.run_local_server(port=0)
49
  with open(token_path, 'w') as token:
50
  token.write(creds.to_json())
51
  else:
52
  flow = InstalledAppFlow.from_client_secrets_file(credentials_path, SCOPES)
53
- creds = flow.run_local_server(port=0)
54
  with open(token_path, 'w') as token:
55
  token.write(creds.to_json())
56
 
 
3
  import os
4
  import re
5
  import asyncio
 
6
  import subprocess
7
  from huggingface_hub import InferenceClient
8
  from googleapiclient.discovery import build
 
44
  creds.refresh(Request())
45
  else:
46
  flow = InstalledAppFlow.from_client_secrets_file(credentials_path, SCOPES)
47
+ creds = flow.run_console() # run_local_server 대신 run_console 사용
48
  with open(token_path, 'w') as token:
49
  token.write(creds.to_json())
50
  else:
51
  flow = InstalledAppFlow.from_client_secrets_file(credentials_path, SCOPES)
52
+ creds = flow.run_console() # run_local_server 대신 run_console 사용
53
  with open(token_path, 'w') as token:
54
  token.write(creds.to_json())
55