multimodalart HF Staff commited on
Commit
8b62ec4
·
verified ·
1 Parent(s): 17c5293

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -197,7 +197,7 @@ CSS = """
197
  .dark .gradio-container { color: var(--body-text-color); }
198
  """
199
 
200
- with gr.Blocks(theme=gr.themes.Citrus(), css=CSS, title="TinyCast Forecaster") as demo:
201
  gr.Markdown(
202
  "# TinyCast: Probabilistic Zero-Shot Forecasting\n\n"
203
  "An attention-free, 146K-parameter time-series foundation model that forecasts "
@@ -238,6 +238,13 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS, title="TinyCast Forecaster") a
238
  plot_output = gr.Plot(label="Probabilistic forecast")
239
  info_output = gr.Textbox(label="Summary", interactive=False)
240
 
 
 
 
 
 
 
 
241
  gr.Markdown("### Examples")
242
  gr.Examples(
243
  examples=[
@@ -261,4 +268,4 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS, title="TinyCast Forecaster") a
261
 
262
 
263
  if __name__ == "__main__":
264
- demo.launch(mcp_server=True)
 
197
  .dark .gradio-container { color: var(--body-text-color); }
198
  """
199
 
200
+ with gr.Blocks(title="TinyCast Forecaster") as demo:
201
  gr.Markdown(
202
  "# TinyCast: Probabilistic Zero-Shot Forecasting\n\n"
203
  "An attention-free, 146K-parameter time-series foundation model that forecasts "
 
238
  plot_output = gr.Plot(label="Probabilistic forecast")
239
  info_output = gr.Textbox(label="Summary", interactive=False)
240
 
241
+ run_btn.click(
242
+ fn=forecast,
243
+ inputs=[csv_input, text_input, freq_choice, prediction_length, flip_inv],
244
+ outputs=[plot_output, info_output],
245
+ api_name="forecast",
246
+ )
247
+
248
  gr.Markdown("### Examples")
249
  gr.Examples(
250
  examples=[
 
268
 
269
 
270
  if __name__ == "__main__":
271
+ demo.launch(mcp_server=True, theme=gr.themes.Citrus(), css=CSS)