Spaces:
Sleeping
Sleeping
updated
Browse files
app.py
CHANGED
|
@@ -84,7 +84,7 @@ def generate_tailored_resume(
|
|
| 84 |
model: str,
|
| 85 |
template_choice: str,
|
| 86 |
save_key: bool,
|
| 87 |
-
) -> Tuple[str, str, str,
|
| 88 |
logs = []
|
| 89 |
|
| 90 |
def log(msg: str):
|
|
@@ -148,11 +148,11 @@ def generate_tailored_resume(
|
|
| 148 |
rendered_latex,
|
| 149 |
missing_text,
|
| 150 |
questions_text,
|
| 151 |
-
tailored.keyword_alignment.dict(),
|
| 152 |
"\n".join(logs),
|
| 153 |
tex_file_path,
|
| 154 |
pdf_file_path,
|
| 155 |
-
|
| 156 |
)
|
| 157 |
except Exception as exc:
|
| 158 |
log(f"Error: {exc}")
|
|
@@ -187,8 +187,8 @@ def build_ui():
|
|
| 187 |
latex_preview = gr.Code(label="LaTeX Output", language="markdown")
|
| 188 |
missing_panel = gr.Textbox(label="Missing / Needs Confirmation", lines=6)
|
| 189 |
questions_panel = gr.Textbox(label="Questions for user", lines=4)
|
| 190 |
-
keyword_alignment = gr.
|
| 191 |
-
resume_json = gr.
|
| 192 |
tex_download = gr.File(label="Export .tex")
|
| 193 |
pdf_download = gr.File(label="Export PDF (requires latexmk)")
|
| 194 |
|
|
@@ -214,9 +214,9 @@ def build_ui():
|
|
| 214 |
|
| 215 |
if __name__ == "__main__":
|
| 216 |
app = build_ui()
|
| 217 |
-
# On Spaces,
|
| 218 |
app.launch(
|
| 219 |
server_name="0.0.0.0",
|
| 220 |
server_port=int(os.getenv("PORT", "7860")),
|
| 221 |
-
share=
|
| 222 |
)
|
|
|
|
| 84 |
model: str,
|
| 85 |
template_choice: str,
|
| 86 |
save_key: bool,
|
| 87 |
+
) -> Tuple[str, str, str, str, str, Optional[str], Optional[str], str]:
|
| 88 |
logs = []
|
| 89 |
|
| 90 |
def log(msg: str):
|
|
|
|
| 148 |
rendered_latex,
|
| 149 |
missing_text,
|
| 150 |
questions_text,
|
| 151 |
+
json.dumps(tailored.keyword_alignment.dict(), indent=2),
|
| 152 |
"\n".join(logs),
|
| 153 |
tex_file_path,
|
| 154 |
pdf_file_path,
|
| 155 |
+
resume.json(indent=2),
|
| 156 |
)
|
| 157 |
except Exception as exc:
|
| 158 |
log(f"Error: {exc}")
|
|
|
|
| 187 |
latex_preview = gr.Code(label="LaTeX Output", language="markdown")
|
| 188 |
missing_panel = gr.Textbox(label="Missing / Needs Confirmation", lines=6)
|
| 189 |
questions_panel = gr.Textbox(label="Questions for user", lines=4)
|
| 190 |
+
keyword_alignment = gr.Textbox(label="Keyword alignment", lines=6)
|
| 191 |
+
resume_json = gr.Textbox(label="Resume JSON (parsed)", lines=10)
|
| 192 |
tex_download = gr.File(label="Export .tex")
|
| 193 |
pdf_download = gr.File(label="Export PDF (requires latexmk)")
|
| 194 |
|
|
|
|
| 214 |
|
| 215 |
if __name__ == "__main__":
|
| 216 |
app = build_ui()
|
| 217 |
+
# On Spaces, share=False is preferred; HF handles routing.
|
| 218 |
app.launch(
|
| 219 |
server_name="0.0.0.0",
|
| 220 |
server_port=int(os.getenv("PORT", "7860")),
|
| 221 |
+
share=False,
|
| 222 |
)
|