sqfoo commited on
Commit
d4f2bde
·
1 Parent(s): 62e738e

Updated app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -40,19 +40,19 @@ def nowcasting(file, cfg_str, ensemble_no):
40
  return figure
41
 
42
 
43
- if __name__ == "__main__":
44
- with gr.Blocks() as demo:
45
- gr.Markdown("# STLDM official demo for nowcasting")
46
- gr.Markdown("Please upload the radar sequences with **at least 5 frames** in the format of .npy file, and **STLDM** will predict the future 20 frames based on the past 5 frames.")
47
- gr.Markdown('Please refer to [paper](https://arxiv.org/abs/2512.21118) and [code](https://github.com/sqfoo/stldm_official) for more details about STLDM.')
48
 
49
- file_input = gr.File(label="Upload the input radar squences", file_types=[".npy"])
50
- cfg_str = gr.Slider(0.0, 2.0, value=1.0, step=0.1, label="Classifier Free Guidance Scale")
51
- ensemble_no = gr.Slider(1, 10, value=2, step=1, label="How many ensemble predictions?")
 
52
 
53
- output = gr.Image(label="Nowcasting Results")
54
- btn = gr.Button("Forecast Now!")
55
- btn.click(fn=nowcasting, inputs=[file_input, cfg_str, ensemble_no], outputs=output)
56
 
57
- demo.launch(show_api=False, enable_queue=False)
 
 
 
 
58
 
 
40
  return figure
41
 
42
 
 
 
 
 
 
43
 
44
+ with gr.Blocks() as demo:
45
+ gr.Markdown("# STLDM official demo for nowcasting")
46
+ gr.Markdown("Please upload the radar sequences with **at least 5 frames** in the format of .npy file, and **STLDM** will predict the future 20 frames based on the past 5 frames.")
47
+ gr.Markdown('Please refer to [paper](https://arxiv.org/abs/2512.21118) and [code](https://github.com/sqfoo/stldm_official) for more details about STLDM.')
48
 
49
+ file_input = gr.File(label="Upload the input radar squences", file_types=[".npy"])
50
+ cfg_str = gr.Slider(0.0, 2.0, value=1.0, step=0.1, label="Classifier Free Guidance Scale")
51
+ ensemble_no = gr.Slider(1, 10, value=2, step=1, label="How many ensemble predictions?")
52
 
53
+ output = gr.Image(label="Nowcasting Results")
54
+ btn = gr.Button("Forecast Now!")
55
+ btn.click(fn=nowcasting, inputs=[file_input, cfg_str, ensemble_no], outputs=output)
56
+
57
+ demo.launch(show_api=False, enable_queue=False)
58