test_gradio / app.py
John Smith
Update app.py
2cfa253
raw
history blame
751 Bytes
import gradio as gr
def sentence_builder(quantity, animal):
return f"""The {quantity} {animal}s from went to the where they until the """
demo = gr.Interface(
sentence_builder,
[
gr.Slider(2009, 2023, value=2009, label="Count", info="Choose a year between 2009 and 2023"),
gr.Slider(0, 120167, value=0, label="Count", info="Enter mileage between 0 and 120167"),
],
"text",
#examples=[
# [2, "cat", ["Japan", "Pakistan"], "park", ["ate", "swam"], True],
# [4, "dog", ["Japan"], "zoo", ["ate", "swam"], False],
# [10, "bird", ["USA", "Pakistan"], "road", ["ran"], False],
# [8, "cat", ["Pakistan"], "zoo", ["ate"], True],
#]
)
if __name__ == "__main__":
demo.launch()