Add direct live Google competitor rate checks
Browse files
README.md
CHANGED
|
@@ -4,58 +4,41 @@ emoji: 🏨
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 6.5.1
|
| 8 |
-
python_version: "3.12"
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
---
|
| 12 |
|
| 13 |
-
# Hotel Rate Radar
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
Shopping is fixed to one night, two adults, no children, USD, advertised 1 Queen rooms and explicitly pre-tax nightly prices. The provider must confirm hotel identity, Santa Cruz location and query parameters. Generic property-level prices are excluded. One lowest accepted offer per seller is averaged arithmetically; the competitor average weights each available hotel equally. Missing competitors are omitted, never treated as zero.
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
The source-status accordion reports each hotel, failure and timestamp; CSV exports include source audit JSON. Blank occupancy and pickup add no demand adjustment. Current entered prices are not automatically copied from suggested rates.
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
## Last known prices
|
| 36 |
-
|
| 37 |
-
When refresh fails, Source status shows the last successfully validated seller average for that exact hotel, check-in, room category, stay length, guests, currency and tax basis. Original observation timestamps are preserved. No saved observation displays “— · No saved price for this stay”. Historical prices are display-only and do not enter current averages or automatic recommendations.
|
| 38 |
-
|
| 39 |
-
Public price summaries are saved in rate_history.sqlite3. They survive Python restarts on the same disk, but an ephemeral Space rebuild may erase them. For durable history, configure RATE_HISTORY_PATH to a writable file on an existing persistent volume. No historical prices are bundled in this ZIP; history begins with successful lookups after installation. Keep the existing valid SERPAPI_API_KEY Secret.
|
| 40 |
-
|
| 41 |
-
## Professional dashboard update
|
| 42 |
-
|
| 43 |
-
- Compact navy header, ice-blue surfaces, responsive cards and clear keyboard focus.
|
| 44 |
-
- Useful initial state without fabricated example prices.
|
| 45 |
-
- Five hotel snapshot cards distinguish observed quotes, historical quotes and no saved quote; timestamps stay visible.
|
| 46 |
-
- Historic fallback remains display-only. Pricing controls, room recommendations and market sources remain separate.
|
| 47 |
-
- Advanced settings are collapsed initially; the main input panel stays compact.
|
| 48 |
-
- Manual and timer analyses share one concurrency queue. Past live-shopping dates and nonpositive rate limits are rejected before provider calls.
|
| 49 |
-
- PREVIEW.html is a static visual preview of the real dashboard cards and room table. It is not an interactive application or a live rate feed.
|
| 50 |
-
|
| 51 |
-
Keep the existing valid API Secrets. Upload the application files and restart your existing Space; deployment is not performed by this ZIP. Offline regression tests and Gradio import checks pass. Live prices still require validation with your configured provider account.
|
| 52 |
-
|
| 53 |
-
Changing pricing inputs clears previous results before a new analysis. Browser screenshot verification could not be completed in the build environment because the browser download timed out. The preview is static; runtime Gradio rendering should be checked in the Space before publishing further changes.
|
| 54 |
-
|
| 55 |
-
## Hourly pricing update
|
| 56 |
-
|
| 57 |
-
Hourly refresh and fresh provider requests default ON; the initial view uses Live now in Santa Cruz. Leave the page open and Space awake. This is not an unattended background scheduler. Each refresh may use up to 10 searches for one date or 300 for an explicitly enabled 30-day scenario; it never writes to ASI.
|
| 58 |
-
|
| 59 |
-
Starting policy (operator-adjustable): 2% reduction per elapsed hour after 6 PM, capped at 10%. Set the hourly reduction slider to zero to disable. Closing-time discounts combine with this up to 20%. After 6 PM, high traffic disables its positive demand uplift; room types with known remaining inventory at or below 25% receive −3% instead of the scarcity premium. Zero available rooms get no suggested price. Unknown inventory does not trigger this rule. These are configured business assumptions, not statistically learned effects. Other market signals may still change the final recommendation.
|
| 60 |
-
|
| 61 |
-
Room spacing now interpolates the supplied ASI reference profiles at $85, $199 and $269 base rates; these reference profiles are not assigned permanently to dates or weekdays. Default maximum increases to $599 to permit the screenshot's $409 room. All room recommendations respect the operator's minimum and maximum. Original public quotes remain unchanged. Last known quotes stay labeled historical.
|
|
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
|
|
|
|
|
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Hotel Rate Radar
|
| 12 |
|
| 13 |
+
Live pricing support for Surf City Inn & Suites.
|
| 14 |
|
| 15 |
+
This build:
|
| 16 |
+
- preserves the compact blue UI and hotel-themed background;
|
| 17 |
+
- uses the owner's current/manual base rate as the dashboard Current rate;
|
| 18 |
+
- uses a 12-hour time selector;
|
| 19 |
+
- uses the long-running room-type pricing pattern as a relative ladder rather than hard-coding screenshot dates;
|
| 20 |
+
- applies room scarcity only when Rooms left is actually entered;
|
| 21 |
+
- uses Google Hotels/SerpApi public offers and, for a selected date, attempts a property-details lookup so more public booking sources such as Priceline, KAYAK, Booking.com, Expedia, Hotels.com, Agoda, or direct offers can be included when returned;
|
| 22 |
+
- deduplicates the same booking source before calculating an observed public-rate average;
|
| 23 |
+
- keeps traffic, events, weather, occupancy, pickup and 30-day forecasting.
|
| 24 |
|
| 25 |
+
- Adds the playful Daadu note: below $100 = “Daadu not happy 😅”; $100+ = “Daadu is happy 😄”.
|
| 26 |
|
| 27 |
+
- Updated the app hero/header to use a warm hotel bed background image for a more hospitality-style look.
|
| 28 |
|
|
|
|
| 29 |
|
| 30 |
+
Update: restored the navy-blue Rate Radar banner and improved mobile dropdown/readability contrast.
|
| 31 |
|
|
|
|
| 32 |
|
| 33 |
+
Market-rate fix:
|
| 34 |
+
- uses one lowest comparable base-room quote per booking provider;
|
| 35 |
+
- filters suite/package prices from Google Hotels property details;
|
| 36 |
+
- prioritizes Hotel Solares, Riverside Inn & Suites Santa Cruz, Capri Motel and Aqua Inn;
|
| 37 |
+
- rejects competitor outliers far from Surf City's market;
|
| 38 |
+
- uses a Solares-weighted competitor benchmark;
|
| 39 |
+
- adds a final sanity guardrail so ordinary-demand recommendations cannot jump far above the observable market.
|
| 40 |
|
| 41 |
+
- Selected-date refresh now checks the named competitor set directly on Google Hotels through SerpApi.
|
| 42 |
+
- Named comps checked: Hotel Solares, Riverside Inn & Suites Santa Cruz, Capri Motel, and Aqua Inn.
|
| 43 |
+
- Only one lowest comparable nightly rate per competitor is used.
|
| 44 |
+
- Exact named Google competitor results replace generic nearby estimates when available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|