Update app.py
Browse files
app.py
CHANGED
|
@@ -8,10 +8,10 @@ model = pipeline('text-generation', model='distilgpt2', framework='pt')
|
|
| 8 |
|
| 9 |
# Load and parse the PDF file for the knowledge base
|
| 10 |
pdf_path = "Einsteiger Guide Leben im Einklang mit dem weiblichen Zyklus.pdf"
|
| 11 |
-
pdf_reader = PyPDF2.
|
| 12 |
pdf_text = ""
|
| 13 |
-
for page_num in range(pdf_reader.
|
| 14 |
-
page = pdf_reader.
|
| 15 |
pdf_text += page.extract_text()
|
| 16 |
|
| 17 |
# Define the CSS style for the UI with a mobile-friendly design
|
|
@@ -129,6 +129,8 @@ st.write("""
|
|
| 129 |
Remember, your body and cycle are unique. Embrace and understand your cycle to align better with your body's natural rhythms.
|
| 130 |
""")
|
| 131 |
|
|
|
|
|
|
|
| 132 |
st.header("References")
|
| 133 |
st.write("""
|
| 134 |
This is a beta-version of 2024-06-02 and we are happy to assist you with the updated version. Greetings Nur M. """)
|
|
|
|
| 8 |
|
| 9 |
# Load and parse the PDF file for the knowledge base
|
| 10 |
pdf_path = "Einsteiger Guide Leben im Einklang mit dem weiblichen Zyklus.pdf"
|
| 11 |
+
pdf_reader = PyPDF2.PdfReader(pdf_path)
|
| 12 |
pdf_text = ""
|
| 13 |
+
for page_num in range(len(pdf_reader.pages)):
|
| 14 |
+
page = pdf_reader.pages[page_num]
|
| 15 |
pdf_text += page.extract_text()
|
| 16 |
|
| 17 |
# Define the CSS style for the UI with a mobile-friendly design
|
|
|
|
| 129 |
Remember, your body and cycle are unique. Embrace and understand your cycle to align better with your body's natural rhythms.
|
| 130 |
""")
|
| 131 |
|
| 132 |
+
|
| 133 |
+
|
| 134 |
st.header("References")
|
| 135 |
st.write("""
|
| 136 |
This is a beta-version of 2024-06-02 and we are happy to assist you with the updated version. Greetings Nur M. """)
|