File size: 1,652 Bytes
222d197
 
fc00923
222d197
fc00923
 
 
 
222d197
cf064e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222d197
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
title: Hotel OS Bot
emoji: πŸš€
colorFrom: blue
colorTo: yellow
sdk: gradio
pinned: true
license: bigscience-openrail-m
---
# Hotel OS Bot

A Telegram bot for managing hotel operations, including bookings, payments, and expenses.

## Project Structure

```
hotel_os_bot/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ main.py           # Bot + FastAPI + Polling
β”‚   β”œβ”€β”€ utils.py          # OCR, Verify, DB helpers
β”‚   └── resources/
β”‚       └── pms_blueprint.txt
β”œβ”€β”€ webapp/
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ style.css
β”‚   └── app.js
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ backup_db.py
β”‚   └── notify_pending.py
β”œβ”€β”€ data/
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ .dockerignore
β”œβ”€β”€ start.sh
β”œβ”€β”€ space.yaml
β”œβ”€β”€ .env.example
└── README.md
```

## How to Run

1.  **Set up the environment:**
    ```bash
    cp .env.example .env
    ```
    Then, edit the `.env` file with your actual credentials (Telegram Bot Token, User ID, Gemini API Key).

2.  **Install dependencies:**
    ```bash
    pip install -r requirements.txt
    ```

3.  **Run the application:**
    ```bash
    chmod +x start.sh
    ./start.sh
    ```
    Alternatively, you can run the main module directly:
    ```bash
    python -m app.main
    ```

## Deploy to Hugging Face Spaces

1.  Push the code to a GitHub repository.
2.  Create a new Space on Hugging Face, selecting the "Docker" runtime.
3.  Connect the Space to your GitHub repository.
4.  In the Space settings, add the secrets from your `.env` file (`TELEGRAM_BOT_TOKEN`, `TELEGRAM_USER_ID`, `GEMINI_API_KEY`).