test2 / app.py
Jnior's picture
ddd
7d72a3c
raw
history blame
No virus
1.08 kB
import gradio as gr
import matplotlib
#matplotlib.use("Agg")
import matplotlib.pyplot as plt
# import numpy as np
# import plotly.express as px
# import pandas as pd
def outbreak(plot_type, r, month, countries, social_distancing):
return " 145 Fcfa/ for 2Kg"
inputs = [
gr.Dropdown(["Matplotlib", "Plotly", "Altair"], label="Plot Type"),
gr.Dropdown(["January", "February", "March", "April", "May"], label="Month"),
gr.Dropdown(["January", "February", "March", "April", "May"], label="Month"),
gr.Dropdown(["January", "February", "March", "April", "May"], label="Month"),
gr.Dropdown(["January", "February", "March", "April", "May"], label="Month"),
]
outputs = "label"
demo = gr.Interface(
fn=outbreak,
inputs=inputs,
outputs=outputs,
# examples=[
# ["Matplotlib", 2, "March", ["Mexico", "UK"], True],
# ["Altair", 2, "March", ["Mexico", "Canada"], True],
# ["Plotly", 3.6, "February", ["Canada", "Mexico", "UK"], False],
# ],
cache_examples=True,
)
if __name__ == "__main__":
demo.launch()