sharanyaswarup commited on
Commit
5ceee30
Β·
1 Parent(s): 49f8c4f

Add unbuffered logging to diagnose startup

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -0
  2. app.py +1 -0
Dockerfile CHANGED
@@ -13,5 +13,6 @@ COPY . .
13
  EXPOSE 7860
14
 
15
  ENV PORT=7860
 
16
 
17
  CMD ["python", "app.py"]
 
13
  EXPOSE 7860
14
 
15
  ENV PORT=7860
16
+ ENV PYTHONUNBUFFERED=1
17
 
18
  CMD ["python", "app.py"]
app.py CHANGED
@@ -534,6 +534,7 @@ with gr.Blocks(title="School Name Resolver") as app:
534
  # ─── Launch ───────────────────────────────────────────────────────────────────
535
  if __name__ == "__main__":
536
  port = int(os.getenv("PORT", 7860))
 
537
  app.launch(
538
  server_name="0.0.0.0",
539
  server_port=port,
 
534
  # ─── Launch ───────────────────────────────────────────────────────────────────
535
  if __name__ == "__main__":
536
  port = int(os.getenv("PORT", 7860))
537
+ print(f"Starting Gradio app on port {port}...", flush=True)
538
  app.launch(
539
  server_name="0.0.0.0",
540
  server_port=port,