TheMaisk commited on
Commit
025dd84
·
verified ·
1 Parent(s): ae915db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -8,6 +8,17 @@ import os
8
  from PIL import Image
9
  from io import BytesIO
10
 
 
 
 
 
 
 
 
 
 
 
 
11
  class Prodia:
12
  def __init__(self, api_key, base=None):
13
  self.base = base or "https://api.prodia.com/v1"
 
8
  from PIL import Image
9
  from io import BytesIO
10
 
11
+
12
+ def check_password():
13
+ expected_password = os.environ.get('PASSWORD') # Hier wird das in Huggingface Secrets gespeicherte Passwort abgerufen
14
+ user_password = input("Bitte Passwort eingeben: ")
15
+ if user_password != expected_password:
16
+ print("Falsches Passwort. Zugriff verweigert.")
17
+ exit() # Beendet das Programm, wenn das falsche Passwort eingegeben wird
18
+
19
+ # Aufruf der Passwortabfrage
20
+ check_password()
21
+
22
  class Prodia:
23
  def __init__(self, api_key, base=None):
24
  self.base = base or "https://api.prodia.com/v1"