Juna190825 commited on
Commit
b4ea3bd
·
verified ·
1 Parent(s): 8763181
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -21,6 +21,10 @@ import gradio as gr
21
  # from selenium.webdriver.firefox.options import Options
22
  # from selenium.webdriver.common.by import By
23
 
 
 
 
 
24
 
25
  # Configure logging
26
  logging.basicConfig(
@@ -89,9 +93,7 @@ def verify_geckodriver2():
89
  logger.error(f"Version check failed: {str(e)}")
90
  raise
91
 
92
- # Use these specific ports
93
- MARIONETTE_PORT = 2828
94
- WEBDRIVER_PORT = 4444
95
 
96
  def create_service():
97
  # 1. Verify geckodriver
 
21
  # from selenium.webdriver.firefox.options import Options
22
  # from selenium.webdriver.common.by import By
23
 
24
+ # Use these specific ports
25
+ # Try different ports if default ones are busy
26
+ MARIONETTE_PORT = random.randint(2828, 2928)
27
+ WEBDRIVER_PORT = random.randint(4444, 4544)
28
 
29
  # Configure logging
30
  logging.basicConfig(
 
93
  logger.error(f"Version check failed: {str(e)}")
94
  raise
95
 
96
+
 
 
97
 
98
  def create_service():
99
  # 1. Verify geckodriver