Spaces:
Sleeping
Sleeping
updated
Browse files
app.py
CHANGED
|
@@ -159,7 +159,16 @@ def generate_tailored_resume(
|
|
| 159 |
log(
|
| 160 |
"If this persists, verify your OpenAI API key/model and that outbound network access is allowed."
|
| 161 |
)
|
| 162 |
-
return (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
|
| 164 |
|
| 165 |
def build_ui():
|
|
@@ -214,9 +223,9 @@ def build_ui():
|
|
| 214 |
|
| 215 |
if __name__ == "__main__":
|
| 216 |
app = build_ui()
|
| 217 |
-
# On Spaces, share=
|
| 218 |
app.launch(
|
| 219 |
server_name="0.0.0.0",
|
| 220 |
server_port=int(os.getenv("PORT", "7860")),
|
| 221 |
-
share=
|
| 222 |
)
|
|
|
|
| 159 |
log(
|
| 160 |
"If this persists, verify your OpenAI API key/model and that outbound network access is allowed."
|
| 161 |
)
|
| 162 |
+
return (
|
| 163 |
+
"",
|
| 164 |
+
f"An error occurred: {exc}",
|
| 165 |
+
"",
|
| 166 |
+
"",
|
| 167 |
+
"\n".join(logs),
|
| 168 |
+
None,
|
| 169 |
+
None,
|
| 170 |
+
"",
|
| 171 |
+
)
|
| 172 |
|
| 173 |
|
| 174 |
def build_ui():
|
|
|
|
| 223 |
|
| 224 |
if __name__ == "__main__":
|
| 225 |
app = build_ui()
|
| 226 |
+
# On Spaces, enforce share=True to avoid localhost accessibility issues.
|
| 227 |
app.launch(
|
| 228 |
server_name="0.0.0.0",
|
| 229 |
server_port=int(os.getenv("PORT", "7860")),
|
| 230 |
+
share=True,
|
| 231 |
)
|