ginipick commited on
Commit
3b4bd32
·
verified ·
1 Parent(s): 14b314e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -12,7 +12,6 @@ from selenium.webdriver.chrome.service import Service
12
  from webdriver_manager.chrome import ChromeDriverManager
13
  from selenium.webdriver.chrome.options import Options
14
 
15
-
16
  HF_TOKEN = os.getenv("HF_TOKEN")
17
  hf_client = InferenceClient("CohereForAI/c4ai-command-r-plus-08-2024", token=HF_TOKEN)
18
 
@@ -110,7 +109,7 @@ async def on_select(space):
110
  return f"오류가 발생했습니다: {str(e)}", "", Image.new('RGB', (1080, 720), color='lightgray')
111
 
112
  async def take_screenshot(url):
113
- options = webdriver.ChromeOptions()
114
  options.add_argument('--headless')
115
  options.add_argument('--no-sandbox')
116
  options.add_argument('--disable-dev-shm-usage')
@@ -129,7 +128,7 @@ async def take_screenshot(url):
129
  finally:
130
  if 'driver' in locals():
131
  driver.quit()
132
-
133
  def create_ui():
134
  try:
135
  spaces_list = get_most_liked_spaces()
 
12
  from webdriver_manager.chrome import ChromeDriverManager
13
  from selenium.webdriver.chrome.options import Options
14
 
 
15
  HF_TOKEN = os.getenv("HF_TOKEN")
16
  hf_client = InferenceClient("CohereForAI/c4ai-command-r-plus-08-2024", token=HF_TOKEN)
17
 
 
109
  return f"오류가 발생했습니다: {str(e)}", "", Image.new('RGB', (1080, 720), color='lightgray')
110
 
111
  async def take_screenshot(url):
112
+ options = Options()
113
  options.add_argument('--headless')
114
  options.add_argument('--no-sandbox')
115
  options.add_argument('--disable-dev-shm-usage')
 
128
  finally:
129
  if 'driver' in locals():
130
  driver.quit()
131
+
132
  def create_ui():
133
  try:
134
  spaces_list = get_most_liked_spaces()