Araeynn commited on
Commit
da57ba6
1 Parent(s): afe4531

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -12,6 +12,16 @@ from colorama import Fore, Style
12
  import streamlit as st
13
  from huggingface_hub import InferenceClient, login
14
 
 
 
 
 
 
 
 
 
 
 
15
  try:
16
  os.mkdir("data")
17
  except:
 
12
  import streamlit as st
13
  from huggingface_hub import InferenceClient, login
14
 
15
+ import os
16
+
17
+ lock_file_path = "test.txt"
18
+
19
+ if not os.path.exists(lock_file_path):
20
+ with open(lock_file_path, "w") as f:
21
+ f.write("Running!")
22
+ else:
23
+ print("Streamlit app is already running.")
24
+
25
  try:
26
  os.mkdir("data")
27
  except: