Matchball commited on
Commit
d60f6f9
·
verified ·
1 Parent(s): 1bf398a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -7
app.py CHANGED
@@ -1286,22 +1286,33 @@ def extract_text_from_pdf(pdf_file):
1286
 
1287
 
1288
 
 
1289
 
1290
  def main():
1291
  st.set_page_config(page_title="Check Accurate Mass Measurements", page_icon="🧪", layout="wide")
1292
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1293
  st.title("Check Accurate Mass Measurements")
1294
-
1295
  st.markdown("[M. Christmann, *Org. Lett.* **2025**, *27*, 4–7.](https://pubs.acs.org/doi/10.1021/acs.orglett.4c03458)")
1296
-
1297
  st.write("""
1298
  This app automatically analyzes accurate mass measurements.
1299
  Upload a PDF file or paste your text in the box below to analyze it.
1300
  """)
1301
 
1302
-
1303
-
1304
- # Create tabs for different input methods
1305
  tab1, tab2 = st.tabs(["Upload PDF", "Text Input"])
1306
 
1307
  with tab1:
@@ -1320,7 +1331,6 @@ def main():
1320
  st.error("Failed to extract text from the PDF. Please check if the PDF contains extractable text.")
1321
 
1322
  with tab2:
1323
- # Text input area
1324
  text_input = st.text_area("Paste your text here:", height=300)
1325
  analyze_text = st.button("Analyze Text")
1326
 
@@ -1329,11 +1339,12 @@ def main():
1329
  st.warning("Please paste some text to analyze.")
1330
  else:
1331
  st.write("---")
1332
- # Replace newlines with spaces to match the original behavior
1333
  text_content = text_input.replace('\n', ' ')
1334
  analyze_content(text_content)
1335
 
1336
 
 
 
1337
  def analyze_content(text_content):
1338
  text_content = remove_specific_lines_from_string(text_content)
1339
  # st.write(text_content)
 
1286
 
1287
 
1288
 
1289
+ # Assume utility functions are imported as before
1290
 
1291
  def main():
1292
  st.set_page_config(page_title="Check Accurate Mass Measurements", page_icon="🧪", layout="wide")
1293
 
1294
+ st.markdown(
1295
+ """
1296
+ <style>
1297
+ div.block-container {
1298
+ overflow-y: auto !important;
1299
+ }
1300
+ iframe {
1301
+ overflow: visible !important;
1302
+ }
1303
+ </style>
1304
+ """, unsafe_allow_html=True
1305
+ )
1306
+
1307
  st.title("Check Accurate Mass Measurements")
1308
+
1309
  st.markdown("[M. Christmann, *Org. Lett.* **2025**, *27*, 4–7.](https://pubs.acs.org/doi/10.1021/acs.orglett.4c03458)")
1310
+
1311
  st.write("""
1312
  This app automatically analyzes accurate mass measurements.
1313
  Upload a PDF file or paste your text in the box below to analyze it.
1314
  """)
1315
 
 
 
 
1316
  tab1, tab2 = st.tabs(["Upload PDF", "Text Input"])
1317
 
1318
  with tab1:
 
1331
  st.error("Failed to extract text from the PDF. Please check if the PDF contains extractable text.")
1332
 
1333
  with tab2:
 
1334
  text_input = st.text_area("Paste your text here:", height=300)
1335
  analyze_text = st.button("Analyze Text")
1336
 
 
1339
  st.warning("Please paste some text to analyze.")
1340
  else:
1341
  st.write("---")
 
1342
  text_content = text_input.replace('\n', ' ')
1343
  analyze_content(text_content)
1344
 
1345
 
1346
+
1347
+
1348
  def analyze_content(text_content):
1349
  text_content = remove_specific_lines_from_string(text_content)
1350
  # st.write(text_content)