Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,9 @@ class PDF(FPDF):
|
|
| 37 |
self.set_y(-15)
|
| 38 |
self.set_font("Arial", "I", 8)
|
| 39 |
self.set_text_color(100, 100, 100)
|
| 40 |
-
|
|
|
|
|
|
|
| 41 |
|
| 42 |
def create_pdf(interview_text, note_text, name):
|
| 43 |
pdf = PDF()
|
|
@@ -64,10 +66,19 @@ def create_pdf(interview_text, note_text, name):
|
|
| 64 |
pdf.multi_cell(0, 8, line)
|
| 65 |
pdf.ln(1)
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
filename = f"{name.replace(' ', '_')}_interview.pdf"
|
| 68 |
pdf.output(filename)
|
| 69 |
return filename
|
| 70 |
|
|
|
|
|
|
|
|
|
|
| 71 |
# Streamlit UI
|
| 72 |
st.set_page_config(page_title="Interview Generator", layout="centered")
|
| 73 |
st.title("π Mock Interview Generator for π΅π° Competitive Exams")
|
|
@@ -130,4 +141,4 @@ if submitted:
|
|
| 130 |
with open(file_path, "rb") as f:
|
| 131 |
st.download_button("π Download PDF with Recommendations", f, file_name=file_path, mime="application/pdf")
|
| 132 |
else:
|
| 133 |
-
st.warning("β οΈ Please complete all fields to proceed.")
|
|
|
|
| 37 |
self.set_y(-15)
|
| 38 |
self.set_font("Arial", "I", 8)
|
| 39 |
self.set_text_color(100, 100, 100)
|
| 40 |
+
# Added your contact information here
|
| 41 |
+
footer_text = f"Generated on {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} | Created by Mahar Affandi Noor Ghazi - Pace GK Academy | Contact: +92 311 750 5369"
|
| 42 |
+
self.cell(0, 10, footer_text, align='C')
|
| 43 |
|
| 44 |
def create_pdf(interview_text, note_text, name):
|
| 45 |
pdf = PDF()
|
|
|
|
| 66 |
pdf.multi_cell(0, 8, line)
|
| 67 |
pdf.ln(1)
|
| 68 |
|
| 69 |
+
# Added your credentials at the end of the document
|
| 70 |
+
pdf.ln(15)
|
| 71 |
+
pdf.set_font("Times", "I", 10)
|
| 72 |
+
pdf.set_text_color(0, 0, 128) # Navy blue color
|
| 73 |
+
pdf.multi_cell(0, 6, "Prepared by:\nMahar Affandi Noor Ghazi\nPace GK Academy\nContact: +92 311 750 5369", align='C')
|
| 74 |
+
|
| 75 |
filename = f"{name.replace(' ', '_')}_interview.pdf"
|
| 76 |
pdf.output(filename)
|
| 77 |
return filename
|
| 78 |
|
| 79 |
+
# Rest of the Streamlit UI code remains the same...
|
| 80 |
+
# (The Streamlit UI section below this point remains unchanged from your original code)
|
| 81 |
+
|
| 82 |
# Streamlit UI
|
| 83 |
st.set_page_config(page_title="Interview Generator", layout="centered")
|
| 84 |
st.title("π Mock Interview Generator for π΅π° Competitive Exams")
|
|
|
|
| 141 |
with open(file_path, "rb") as f:
|
| 142 |
st.download_button("π Download PDF with Recommendations", f, file_name=file_path, mime="application/pdf")
|
| 143 |
else:
|
| 144 |
+
st.warning("β οΈ Please complete all fields to proceed.")
|