cyberandy commited on
Commit
9bac0c7
·
verified ·
1 Parent(s): 804833c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -167,6 +167,16 @@ def create_gradio_interface() -> gr.Interface:
167
  )
168
 
169
  if __name__ == "__main__":
 
 
 
 
 
 
 
 
 
 
170
  # Create and launch the interface
171
  iface = create_gradio_interface()
172
- iface.launch(share=True)
 
167
  )
168
 
169
  if __name__ == "__main__":
170
+ # Install Playwright browsers and dependencies
171
+ import subprocess
172
+ try:
173
+ subprocess.run(["playwright", "install"], check=True)
174
+ subprocess.run(["playwright", "install-deps"], check=True)
175
+ except subprocess.CalledProcessError as e:
176
+ print(f"Error installing Playwright dependencies: {e}")
177
+ except Exception as e:
178
+ print(f"Unexpected error during setup: {e}")
179
+
180
  # Create and launch the interface
181
  iface = create_gradio_interface()
182
+ iface.launch()