Antcar commited on
Commit
e4b324d
·
verified ·
1 Parent(s): a680955

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
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 from_pretrained_keras
5
 
6
- # 1. Download the Model from your Repository
7
- # This connects this Space to your uploaded model
8
  print("Downloading model...")
9
- model = from_pretrained_keras("WheelsTransit/HK-TransitFlow-Net")
 
 
 
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 = {