How danish0511/career_conversation_chatbot works
Project type and purpose
• This is a lightweight, serverless full-stack web application (“career_conversation”) that uses the Gradio SDK (v5.38.0) to serve a conversational UI on the web.
• The primary entrypoint is app.py (with possible supplemental logic in main.py). The “files” directory holds Jupyter notebooks (lab1-4) for offline experimentation or preprocessing, not part of the live service.
• Deployment is handled via Vercel (see the .vercel folder and project.json).
File structure
• Top-level code:
• app.py – Gradio app definition and serverless handler.
• main.py – supplemental business logic or helper functions imported by app.py.
• Config files:
• .env – environment variables (API keys, config).
• pyproject.toml & requirements.txt – dependencies.
• .vercel/project.json – Vercel deployment settings.
• Supporting docs: Profile.pdf/.txt and README.md.
• “files” folder: Jupyter notebooks for lab exercises or data prep (offline only).
README
• Confirms: title “career_conversation,” Gradio-based UI, entrypoint app.py, SDK version.
• No mention of database, so assume stateless serverless functions, possibly calling external APIs (e.g., an LLM provider).
Main components
a. User’s web browser (Client)
b. Gradio frontend (served as static assets + JS/CSS by Vercel)
c. Serverless backend function (app.py running under Vercel’s Python runtime)
d. Business logic layer (functions in main.py)
e. External services:
• Environment variable store (from .env / Vercel env settings)
• Potential third-party API (e.g., OpenAI, if used in code)
f. Offline notebooks (files/lab*.ipynb) – represent them as “Data Science / Preprocessing” module, not in the live request path.
Relationships and interactions
1. User → (HTTP) → Gradio UI served by Vercel
2. Gradio UI → (WebSocket / REST call) → app.py function
3. app.py → main.py functions for processing
4. main.py → external API (if any) using credentials from environment variables
5. Response flows back app.py → UI → User
6. Offline notebooks stand aside for data scientists, not invoked during runtime.
Architectural patterns and design principles
• Serverless microservice: each request triggers a fresh app.py invocation.
• Layered separation:
• Presentation layer (Gradio UI)
• Application layer (app.py as handler)
• Domain/Logic layer (main.py functions)
• External integration (third-party APIs, config store)
• 12-factor app compliance: environment variables, single codebase, stateless runtime.
Essential elements
• Deployment boundary around Vercel-hosted parts
• Offline/sidecar notebook component drawn outside the runtime path