Spaces:
Sleeping
Sleeping
Antcar
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,14 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import tensorflow as tf
|
| 3 |
import numpy as np
|
| 4 |
-
from huggingface_hub import
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
# This connects this Space to your uploaded model
|
| 8 |
print("Downloading model...")
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# Helper to map day names to integers
|
| 12 |
DAY_MAP = {
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import tensorflow as tf
|
| 3 |
import numpy as np
|
| 4 |
+
from huggingface_hub import hf_hub_download
|
| 5 |
|
| 6 |
+
# --- FIX: Download and Load Manually ---
|
|
|
|
| 7 |
print("Downloading model...")
|
| 8 |
+
model_path = hf_hub_download(repo_id="WheelsTransit/HK-TransitFlow-Net", filename="hk_transit_flow_net.keras")
|
| 9 |
+
|
| 10 |
+
print("Loading Keras model...")
|
| 11 |
+
model = tf.keras.models.load_model(model_path)
|
| 12 |
|
| 13 |
# Helper to map day names to integers
|
| 14 |
DAY_MAP = {
|