Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import webbrowser
|
2 |
import time
|
3 |
import random
|
@@ -5,6 +6,15 @@ import pyautogui
|
|
5 |
import threading
|
6 |
import gradio as gr
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
# Global flag for controlling the process
|
9 |
running = False
|
10 |
|
|
|
1 |
+
import os
|
2 |
import webbrowser
|
3 |
import time
|
4 |
import random
|
|
|
6 |
import threading
|
7 |
import gradio as gr
|
8 |
|
9 |
+
# Automatically install missing dependencies
|
10 |
+
try:
|
11 |
+
import gradio
|
12 |
+
import pyautogui
|
13 |
+
except ImportError:
|
14 |
+
os.system("pip install gradio pyautogui")
|
15 |
+
import gradio
|
16 |
+
import pyautogui
|
17 |
+
|
18 |
# Global flag for controlling the process
|
19 |
running = False
|
20 |
|