Spaces:
Sleeping
Sleeping
elia-waefler
commited on
Commit
·
7c520ae
1
Parent(s):
9872eed
licence & more secure login
Browse files- ai_generated_metadata.txt +1 -5
- app.py +13 -11
ai_generated_metadata.txt
CHANGED
@@ -1,6 +1,2 @@
|
|
1 |
|
2 |
-
|
3 |
-
|
4 |
-
ISB-020-U3-W-H-01-O15004-002-000.pdf;H-Heizung;'Anlagedokumentation';'Anlagedokumentation';
|
5 |
-
|
6 |
-
ISB-020-U3-W-E-01-B07005-001-040.pdf;E-Elektroanlagen;<no classification>;<no classification>;
|
|
|
1 |
|
2 |
+
5.5 wasser abwasserinstallationen-de.pdf;S-Sanitär;'Anlagedokumentation';'Anlagedokumentation';
|
|
|
|
|
|
|
|
app.py
CHANGED
@@ -86,7 +86,6 @@ def json_open(filename):
|
|
86 |
|
87 |
def main():
|
88 |
st.title("Doc Classifier")
|
89 |
-
l, r = st.columns(2)
|
90 |
if st.toggle("show README"):
|
91 |
st.subheader("Funktion: ")
|
92 |
st.write("der Doc Classifier von Elia Wäfler kann einige der BIM2FM Dokumente des ASH nach Disziplin, Doc typ. und Geschoss (später KBOB) klassifizieren. lade ein oder mehrere PDF-Dokumente hoch, um es auszuprobieren. Feedback und Bugs gerne an elia.waefler@insel.ch")
|
@@ -95,6 +94,7 @@ def main():
|
|
95 |
st.subheader("Licence and credits")
|
96 |
st.write("THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.")
|
97 |
st.write("special thanks to OpenAI, Huggingface, Streamlit")
|
|
|
98 |
with l:
|
99 |
st.subheader("Limitationen: ")
|
100 |
st.write("bisher nur PDFs")
|
@@ -109,17 +109,11 @@ def main():
|
|
109 |
if "login" not in st.session_state:
|
110 |
st.session_state.login = False
|
111 |
|
112 |
-
user_pw = st.text_input("ASK_ASH_PASSWORD: ", type="password")
|
113 |
-
if st.button("check"):
|
114 |
-
time.sleep(1)
|
115 |
-
if user_pw == ASK_ASH_PASSWORD:
|
116 |
-
st.session_state.login = True
|
117 |
-
uploaded_files = st.file_uploader("PDF Dokument", accept_multiple_files=True)
|
118 |
-
|
119 |
-
#print(uploaded_file)
|
120 |
-
#print(uploaded_file.name)
|
121 |
-
|
122 |
if st.session_state.login:
|
|
|
|
|
|
|
|
|
123 |
if st.button("classify KBOB!"):
|
124 |
if uploaded_files is not None:
|
125 |
with st.container():
|
@@ -190,6 +184,14 @@ def main():
|
|
190 |
else:
|
191 |
st.warning("no file")
|
192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
|
194 |
if __name__ == "__main__":
|
195 |
#prompts = ["classify the document, tell me the ", "hello"]
|
|
|
86 |
|
87 |
def main():
|
88 |
st.title("Doc Classifier")
|
|
|
89 |
if st.toggle("show README"):
|
90 |
st.subheader("Funktion: ")
|
91 |
st.write("der Doc Classifier von Elia Wäfler kann einige der BIM2FM Dokumente des ASH nach Disziplin, Doc typ. und Geschoss (später KBOB) klassifizieren. lade ein oder mehrere PDF-Dokumente hoch, um es auszuprobieren. Feedback und Bugs gerne an elia.waefler@insel.ch")
|
|
|
94 |
st.subheader("Licence and credits")
|
95 |
st.write("THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.")
|
96 |
st.write("special thanks to OpenAI, Huggingface, Streamlit")
|
97 |
+
l, r = st.columns(2)
|
98 |
with l:
|
99 |
st.subheader("Limitationen: ")
|
100 |
st.write("bisher nur PDFs")
|
|
|
109 |
if "login" not in st.session_state:
|
110 |
st.session_state.login = False
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
if st.session_state.login:
|
113 |
+
uploaded_files = st.file_uploader("PDF Dokument", accept_multiple_files=True)
|
114 |
+
|
115 |
+
# print(uploaded_file)
|
116 |
+
# print(uploaded_file.name)
|
117 |
if st.button("classify KBOB!"):
|
118 |
if uploaded_files is not None:
|
119 |
with st.container():
|
|
|
184 |
else:
|
185 |
st.warning("no file")
|
186 |
|
187 |
+
else:
|
188 |
+
user_pw = st.text_input("ASK_ASH_PASSWORD: ", type="password")
|
189 |
+
if st.button("check"):
|
190 |
+
time.sleep(0.5)
|
191 |
+
if user_pw == ASK_ASH_PASSWORD:
|
192 |
+
st.session_state.login = True
|
193 |
+
st.rerun()
|
194 |
+
|
195 |
|
196 |
if __name__ == "__main__":
|
197 |
#prompts = ["classify the document, tell me the ", "hello"]
|