Spaces:
Runtime error
Runtime error
import gradio as gr | |
def sentence_builder(cerca_una_parola, place, activity_list, morning): | |
return f"""The {animal}s went to the {place} where they {" and ".join(activity_list)} until the {"morning" if morning else "night"}""" | |
demo = gr.Interface( | |
sentence_builder, | |
[ | |
gr.Textbox(), | |
gr.Radio(["park", "zoo", "road"]), | |
gr.CheckboxGroup(["ran", "swam", "ate", "slept"]), | |
gr.Checkbox(label="Is it the morning?"), | |
], | |
"text", | |
examples=[ | |
["cats", "park", ["ran", "swam"], True], | |
["dog", "zoo", ["ate", "swam"], False], | |
["bird", "road", ["ran"], False], | |
["cat", "zoo", ["ate"], True], | |
], | |
) | |
if __name__ == "__main__": | |
demo.launch() |