huy00001 commited on
Commit
a128d97
·
verified ·
1 Parent(s): 7251ced

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -87,7 +87,7 @@ def predict(npz_file):
87
  p = load_pipeline()
88
 
89
  # Stage 1b — CTC
90
- seq = np.load(npz_file.name, allow_pickle=True)["sequence"].astype(np.float32)
91
  x = torch.from_numpy(seq).unsqueeze(0)
92
  with torch.no_grad():
93
  log_probs, _ = p["ctc"](x)
@@ -117,7 +117,7 @@ with gr.Blocks(title="Nhận diện ngôn ngữ ký hiệu tiếng Việt") as d
117
  gr.Markdown("Upload file `.npz` chứa skeleton sequence để nhận diện.")
118
 
119
  with gr.Row():
120
- file_input = gr.File(label="File .npz", file_types=[".npz"])
121
 
122
  btn = gr.Button("Nhận diện", variant="primary")
123
 
 
87
  p = load_pipeline()
88
 
89
  # Stage 1b — CTC
90
+ seq = np.load(npz_file, allow_pickle=True)["sequence"].astype(np.float32)
91
  x = torch.from_numpy(seq).unsqueeze(0)
92
  with torch.no_grad():
93
  log_probs, _ = p["ctc"](x)
 
117
  gr.Markdown("Upload file `.npz` chứa skeleton sequence để nhận diện.")
118
 
119
  with gr.Row():
120
+ file_input = gr.File(label="File .npz", file_types=[".npz"], type="filepath")
121
 
122
  btn = gr.Button("Nhận diện", variant="primary")
123