make gradio working with treads

This commit is contained in:
Jaikinator
2023-11-25 15:17:12 +01:00
parent bbb2c848e3
commit 93e5ce15f9
6 changed files with 101 additions and 21 deletions
+10 -1
View File
@@ -3,7 +3,16 @@ Stores global variables for the app.
"""
# Global variable to store the model
from threading import Event
import time
MODEL = None
MODEL_THREAD_PARAMS = None
MODEL_THREAD = None
# Global variable to track user activity
USER_ACTIVE = False
LAST_USED = time.time()
TIMEOUT = 30 #seconds
TRANSCRIBE_ACTIVE = Event()