Spaces:
Sleeping
Sleeping
Commit
·
3396745
1
Parent(s):
2d01f52
err_no_classification
Browse files
app.py
CHANGED
|
@@ -132,7 +132,10 @@ def main():
|
|
| 132 |
with st.spinner("GPT4 at work"):
|
| 133 |
pdf_text = str(get_pdf_text(file))
|
| 134 |
prompt_1 = auftrag_0 + auftrag_1_disziplin + str(Baubranchen_Disziplinen) + pdf_text
|
| 135 |
-
|
|
|
|
|
|
|
|
|
|
| 136 |
print(prompt_1)
|
| 137 |
metadata.append(answer_1)
|
| 138 |
st.write(answer_1)
|
|
@@ -140,7 +143,10 @@ def main():
|
|
| 140 |
with col2:
|
| 141 |
with st.spinner("GPT4 at work"):
|
| 142 |
prompt_2 = auftrag_0 + auftrag_1_type + str(Dokumententypen) + pdf_text
|
| 143 |
-
|
|
|
|
|
|
|
|
|
|
| 144 |
print(prompt_2)
|
| 145 |
metadata.append(answer_2)
|
| 146 |
|
|
@@ -149,7 +155,10 @@ def main():
|
|
| 149 |
with col3:
|
| 150 |
with st.spinner("GPT4 at work"):
|
| 151 |
prompt_3 = auftrag_0 + auftrag_1_ge + str(ASH_Geschosse) + pdf_text
|
| 152 |
-
|
|
|
|
|
|
|
|
|
|
| 153 |
print(prompt_3)
|
| 154 |
metadata.append(answer_2)
|
| 155 |
|
|
|
|
| 132 |
with st.spinner("GPT4 at work"):
|
| 133 |
pdf_text = str(get_pdf_text(file))
|
| 134 |
prompt_1 = auftrag_0 + auftrag_1_disziplin + str(Baubranchen_Disziplinen) + pdf_text
|
| 135 |
+
try:
|
| 136 |
+
answer_1 = gpt4_new(prompt_1)
|
| 137 |
+
except:
|
| 138 |
+
answer_1 = "<err_no_classification>"
|
| 139 |
print(prompt_1)
|
| 140 |
metadata.append(answer_1)
|
| 141 |
st.write(answer_1)
|
|
|
|
| 143 |
with col2:
|
| 144 |
with st.spinner("GPT4 at work"):
|
| 145 |
prompt_2 = auftrag_0 + auftrag_1_type + str(Dokumententypen) + pdf_text
|
| 146 |
+
try:
|
| 147 |
+
answer_2 = gpt4_new(prompt_2)
|
| 148 |
+
except:
|
| 149 |
+
answer_2 = "<err_no_classification>"
|
| 150 |
print(prompt_2)
|
| 151 |
metadata.append(answer_2)
|
| 152 |
|
|
|
|
| 155 |
with col3:
|
| 156 |
with st.spinner("GPT4 at work"):
|
| 157 |
prompt_3 = auftrag_0 + auftrag_1_ge + str(ASH_Geschosse) + pdf_text
|
| 158 |
+
try:
|
| 159 |
+
answer_3 = gpt4_new(prompt_3)
|
| 160 |
+
except:
|
| 161 |
+
answer_3 = "<err_no_classification>"
|
| 162 |
print(prompt_3)
|
| 163 |
metadata.append(answer_2)
|
| 164 |
|