Alexander Seifert
commited on
Commit
·
8d3e07c
1
Parent(s):
3849c89
passwords are all lowercase
Browse files
app.py
CHANGED
@@ -7,10 +7,10 @@ import streamlit as st
|
|
7 |
# BOOKSHINE_HOST = 'https://api.bookshine.at'
|
8 |
BOOKSHINE_HOST = 'http://localhost'
|
9 |
BOOKSHINE_PORT = '4690'
|
10 |
-
PASSWORDS = os.environ.get("PASSWORDS", "").split(",")
|
11 |
|
12 |
def password_is_correct(password):
|
13 |
-
return password in PASSWORDS
|
14 |
|
15 |
def process_docx(uploaded_file):
|
16 |
# Read and encode file contents
|
@@ -84,7 +84,7 @@ def main():
|
|
84 |
# st.write("Bitte geben Sie die E-Mail-Adresse an, an die Sie die Resultate geschickt haben wollen.")
|
85 |
st.write("Wenn Sie Bookshine testen wollen, aber keinen Zugriffscode haben, schreiben Sie bitte eine E-Mail an [email protected].")
|
86 |
|
87 |
-
password = st.text_input("Zugriffscode")
|
88 |
|
89 |
uploaded_file = st.file_uploader('Manuskript (.docx) oder Umbruch (.pdf) hochladen', type=['docx', 'pdf'], accept_multiple_files=False)
|
90 |
|
|
|
7 |
# BOOKSHINE_HOST = 'https://api.bookshine.at'
|
8 |
BOOKSHINE_HOST = 'http://localhost'
|
9 |
BOOKSHINE_PORT = '4690'
|
10 |
+
PASSWORDS = [p.lower() for p in os.environ.get("PASSWORDS", "").split(",")]
|
11 |
|
12 |
def password_is_correct(password):
|
13 |
+
return password.lower() in PASSWORDS
|
14 |
|
15 |
def process_docx(uploaded_file):
|
16 |
# Read and encode file contents
|
|
|
84 |
# st.write("Bitte geben Sie die E-Mail-Adresse an, an die Sie die Resultate geschickt haben wollen.")
|
85 |
st.write("Wenn Sie Bookshine testen wollen, aber keinen Zugriffscode haben, schreiben Sie bitte eine E-Mail an [email protected].")
|
86 |
|
87 |
+
password = st.text_input("Zugriffscode").lower()
|
88 |
|
89 |
uploaded_file = st.file_uploader('Manuskript (.docx) oder Umbruch (.pdf) hochladen', type=['docx', 'pdf'], accept_multiple_files=False)
|
90 |
|