github-actions[bot] commited on
Commit ·
090b8d2
1
Parent(s): e8be5cb
Auto-deploy from GitHub: 7a5967b93bdd34fbaf59a00e0cc38dbc831c7f94
Browse files- .streamlit/config.toml +14 -0
- DEPLOYMENT.md +2 -2
- Dockerfile +2 -3
- core.py +5 -4
- packages.txt +0 -1
.streamlit/config.toml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[theme]
|
| 2 |
+
primaryColor = "#1e6091"
|
| 3 |
+
backgroundColor = "#ffffff"
|
| 4 |
+
secondaryBackgroundColor = "#e8f0f7"
|
| 5 |
+
textColor = "#1e293b"
|
| 6 |
+
|
| 7 |
+
[server]
|
| 8 |
+
headless = true
|
| 9 |
+
enableCORS = false
|
| 10 |
+
port = 8501
|
| 11 |
+
address = "0.0.0.0"
|
| 12 |
+
|
| 13 |
+
[browser]
|
| 14 |
+
gatherUsageStats = false
|
DEPLOYMENT.md
CHANGED
|
@@ -24,7 +24,7 @@ chatbot/
|
|
| 24 |
├── Dockerfile # Docker configuration (required)
|
| 25 |
├── README.md # HF Space metadata (YAML frontmatter)
|
| 26 |
├── requirements.txt # Python dependencies
|
| 27 |
-
├──
|
| 28 |
├── DEPLOYMENT.md # This guide
|
| 29 |
└── .streamlit/
|
| 30 |
└── config.toml # Streamlit configuration
|
|
@@ -55,7 +55,7 @@ chatbot/
|
|
| 55 |
- `Dockerfile`
|
| 56 |
- `README.md`
|
| 57 |
- `requirements.txt`
|
| 58 |
-
- `
|
| 59 |
- `.streamlit/config.toml` (create the folder structure)
|
| 60 |
4. Commit the files
|
| 61 |
|
|
|
|
| 24 |
├── Dockerfile # Docker configuration (required)
|
| 25 |
├── README.md # HF Space metadata (YAML frontmatter)
|
| 26 |
├── requirements.txt # Python dependencies
|
| 27 |
+
├── .streamlit/ # Streamlit configuration
|
| 28 |
├── DEPLOYMENT.md # This guide
|
| 29 |
└── .streamlit/
|
| 30 |
└── config.toml # Streamlit configuration
|
|
|
|
| 55 |
- `Dockerfile`
|
| 56 |
- `README.md`
|
| 57 |
- `requirements.txt`
|
| 58 |
+
- `.streamlit/config.toml`
|
| 59 |
- `.streamlit/config.toml` (create the folder structure)
|
| 60 |
4. Commit the files
|
| 61 |
|
Dockerfile
CHANGED
|
@@ -4,10 +4,9 @@ FROM python:3.12-slim
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install system dependencies
|
| 8 |
-
COPY packages.txt .
|
| 9 |
RUN apt-get update && \
|
| 10 |
-
|
| 11 |
rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
# Install Python dependencies
|
|
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install system dependencies
|
|
|
|
| 8 |
RUN apt-get update && \
|
| 9 |
+
apt-get install -y curl && \
|
| 10 |
rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
# Install Python dependencies
|
core.py
CHANGED
|
@@ -277,8 +277,9 @@ class Chatbot():
|
|
| 277 |
adults = search_info_json.get("numGuests")
|
| 278 |
)
|
| 279 |
num_hotels = len(hotel_offers.data)
|
| 280 |
-
except:
|
| 281 |
-
|
|
|
|
| 282 |
|
| 283 |
|
| 284 |
|
|
@@ -321,8 +322,8 @@ class Chatbot():
|
|
| 321 |
output.append(f"Price: {offer.get("price").get("currency")} base: ${offer.get("price").get("base")} total: ${offer.get("price").get("total")}")
|
| 322 |
output.append(f"Average Price per night ${offer.get("price").get("variations").get("average").get("base")}")
|
| 323 |
output.append(f"Description: {offer.get("room").get("description").get("text")}")
|
| 324 |
-
except:
|
| 325 |
-
print("
|
| 326 |
|
| 327 |
|
| 328 |
output.append("")
|
|
|
|
| 277 |
adults = search_info_json.get("numGuests")
|
| 278 |
)
|
| 279 |
num_hotels = len(hotel_offers.data)
|
| 280 |
+
except Exception as e:
|
| 281 |
+
print(f"Hotel search error: {e}")
|
| 282 |
+
return "Unable to find hotels matching the search criteria."
|
| 283 |
|
| 284 |
|
| 285 |
|
|
|
|
| 322 |
output.append(f"Price: {offer.get("price").get("currency")} base: ${offer.get("price").get("base")} total: ${offer.get("price").get("total")}")
|
| 323 |
output.append(f"Average Price per night ${offer.get("price").get("variations").get("average").get("base")}")
|
| 324 |
output.append(f"Description: {offer.get("room").get("description").get("text")}")
|
| 325 |
+
except Exception as e:
|
| 326 |
+
print(f"Error parsing hotel info: {e}")
|
| 327 |
|
| 328 |
|
| 329 |
output.append("")
|
packages.txt
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
curl
|
|
|
|
|
|