raj999 commited on
Commit
2b07f08
·
1 Parent(s): b2b99d9
Files changed (1) hide show
  1. app.py +12 -3
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 ("", f"An error occurred: {exc}", "", {}, "\n".join(logs), None, None, {})
 
 
 
 
 
 
 
 
 
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=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
  )
 
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
  )