Decoder2704/python-chatbot-jay
0
1# Final runtime validation — local Docker (before Hugging Face push)2 3Assumes the container is running with **host port 7860** mapped to the app (e.g. `docker run -p 7860:7860 …`).4 5---6 7## 1. App behavior — browser8 91. Open **http://127.0.0.1:7860/** (or your mapped host/port).102. Navigate to the **chat** experience and send a short Python question.113. **Verify:** You get a **200**-equivalent success in the UI: a bot reply with answer-style content (no HTML error page, no endless spinner).12 13Use DevTools **Network** only to confirm requests stay **same-origin** for a single-container deploy (no unexpected cross-origin failures).14 15---16 17## 2. Browser — what to check18 19| Check | Pass criteria |20|--------|----------------|21| Load | **http://127.0.0.1:7860/** opens without blank screen or console **red** errors |22| Chat | Send a message → user bubble + bot reply appear |23| Loading | Brief loading state, then clears; no stuck spinner |24| Error UX | If you break the API (stop container), UI shows a clear error (not silent failure) |25| Same origin | No CORS errors in DevTools **Network** for chat traffic (single-container deploy) |26 27---28 29## 3. Five Python questions (manual)30 31Ask these one at a time; expect a coherent, on-topic **answer** text each time.32 331. What is list comprehension in Python?342. How does a Python decorator work?353. What is the difference between `is` and `==` in Python?364. Explain Python's Global Interpreter Lock (GIL).375. How do you handle exceptions in Python?38 39---40 41## 4. Recruiter-demo readiness (green flags)42 43- Chat sends and receives successfully in the browser after the container is up.44- UI is readable, responsive enough for a live walkthrough, no obvious layout bugs.45- Responses relate to the question (retrieval working); no 500s under normal use.46- You can explain in one sentence: **TF-IDF + cosine similarity** over **Stack Overflow–style data**, **FastAPI** API, **React** UI, **one Docker** image.47 48**Optional polish:** If your deployment exposes interactive API docs from FastAPI, you can show them during the demo.49 50---51 52## 5. Last step before push53 54- [ ] Same checks repeated against the **Space URL** after deploy (replace host with your `*.hf.space` URL; use **https**).55- [ ] `README` Space card YAML (`sdk: docker`, `app_port: 7860`) matches reality.56 