--- title: Moops CRM Assistant emoji: 📊 colorFrom: purple colorTo: purple sdk: gradio sdk_version: 5.38.2 app_file: app.py pinned: false license: mit short_description: Moops CRM Assistant --- # 🛍️ Moops CRM Assistant — All‑in‑One A full‑featured **Gradio‑based CRM web application** with built‑in LLM (Zephyr 7B), Markdown FAQ support, SQLite order tracking, multiple export formats, and email notifications. --- ## ✅ Key Features | Category | Details | |----------|---------| | 🤖 LLM Assistant | Uses **`HuggingFaceH4/zephyr‑7b‑beta`** with streaming via `huggingface_hub`. | | 🧠 Customizable Prompt | Free‑text “Assistant Strategy” plus **auto‑reply templates** (Greeting, Pricing, etc.). | | 📄 FAQ Injection | Upload any `*.md` file or rely on the bundled `faq.md`; content is appended to the system prompt. | | 🗄️ Order Log | Orders are saved to **SQLite `orders.db`** and can be previewed in the UI. | | 💾 Export | One‑click export to **JSON / CSV / XLSX** or flush in‑memory logs to SQLite. | | ✉️ Email Notifications | Gmail SMTP automatically notifies the manager; optional client copy; extra “Notify manager” button. | | 🖥️ Gradio 4 UI | Dark‑mode friendly, supports markdown rendering in the chatbot. | --- ## 📦 Requirements ```bash uv pip install -r requirements.txt ```` > Requires **Python 3.11+** and [`uv`](https://github.com/astral-sh/uv) for fast dependency installs. --- ## 🔐 Environment Variables Create a `.env` file **(not committed to Git)**: ```ini HF_TOKEN=hf_XXXXXXXXXXXXXXXXXXXXXXXXXXXX GMAIL_LOGIN=your_gmail@gmail.com GMAIL_APP_PASS=16_char_app_password MANAGER_EMAIL=manager@example.com ``` > On Hugging Face Spaces, set the same variables under **Settings ➜ Secrets** instead of using a file. --- ## 🚀 Running Locally ```bash uv run app_all_in_one.py ``` Open your browser at **[http://localhost:7860](http://localhost:7860)**. --- ## 📤 Deploying to Hugging Face Spaces ```bash git remote set-url origin https://:@huggingface.co/spaces//Moops git add . git commit -m "🚀 Initial release" git push origin main ``` The Space will rebuild automatically and expose the Gradio interface. --- ## 🗂️ Project Layout ``` . ├── app_all_in_one.py # Main Gradio application ├── faq.md # Default FAQ (markdown) ├── orders.db # SQLite database (auto‑created) ├── requirements.txt # Python dependencies └── README.md # This document ``` --- ## 🪪 License Licensed under the **MIT License**.
---
An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).