Youfeng commited on
Commit
cf20169
·
1 Parent(s): 21ce962

Add app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -24,7 +24,7 @@ class Appointlet():
24
  def setup(self):
25
  options = Options()
26
  options.add_argument('--incognito')
27
- options.add_argument("--headless")
28
  service = ChromeService(ChromeDriverManager().install())
29
  driver = webdriver.Chrome(options=options, service=service)
30
  driver.maximize_window()
@@ -77,7 +77,7 @@ class Appointlet():
77
  driver.quit()
78
 
79
 
80
- # %% Appointlet2GS.ipynb 2
81
  class GoogleSheets():
82
  # def __init__(self, creds_file = 'credentials.json', sh_file = 'googlesheet_info.txt'):
83
  def __init__(self, creds_file, sh_file):
@@ -117,7 +117,7 @@ class GoogleSheets():
117
  wk.update([df.columns.values.tolist()] + df.values.tolist())
118
 
119
 
120
- # %% Appointlet2GS.ipynb 3
121
  def run(account, creds_file, sh_file):
122
  if not account:
123
  return 'Please upload an account file'
@@ -127,7 +127,7 @@ def run(account, creds_file, sh_file):
127
  GoogleSheets(creds_file.name, sh_file.name).update_worksheet()
128
  return 'Update Google Sheets completed!'
129
 
130
- # %% Appointlet2GS.ipynb 6
131
  iface = gr.Interface(fn=run,
132
  inputs=[gr.File(label='Account File'),
133
  gr.File(label='Credentials Json File'),
 
24
  def setup(self):
25
  options = Options()
26
  options.add_argument('--incognito')
27
+ # options.add_argument("--headless")
28
  service = ChromeService(ChromeDriverManager().install())
29
  driver = webdriver.Chrome(options=options, service=service)
30
  driver.maximize_window()
 
77
  driver.quit()
78
 
79
 
80
+ # %% Appointlet2GS.ipynb 3
81
  class GoogleSheets():
82
  # def __init__(self, creds_file = 'credentials.json', sh_file = 'googlesheet_info.txt'):
83
  def __init__(self, creds_file, sh_file):
 
117
  wk.update([df.columns.values.tolist()] + df.values.tolist())
118
 
119
 
120
+ # %% Appointlet2GS.ipynb 4
121
  def run(account, creds_file, sh_file):
122
  if not account:
123
  return 'Please upload an account file'
 
127
  GoogleSheets(creds_file.name, sh_file.name).update_worksheet()
128
  return 'Update Google Sheets completed!'
129
 
130
+ # %% Appointlet2GS.ipynb 7
131
  iface = gr.Interface(fn=run,
132
  inputs=[gr.File(label='Account File'),
133
  gr.File(label='Credentials Json File'),