Spaces:
Runtime error
Runtime error
File size: 352 Bytes
a85a5e9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
def calculate_percentage(*answers):
yes_count = sum(answers)
percentage = yes_count / len(answers) * 100
return f"{percentage}% Yes"
inputs = [gr.Checkbox(label=f"Question {i+1}") for i in range(100)]
output = gr.Textbox()
iface = gr.Interface(fn=calculate_percentage, inputs=inputs, outputs=output)
iface.launch()
|