mariagrandury
commited on
Commit
•
a85a5e9
1
Parent(s):
1e1ebdc
feature: create dummy app
Browse files- .gitignore +2 -0
- app.py +14 -0
- requirements.txt +1 -0
.gitignore
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
venv/
|
2 |
+
.vscode/
|
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
|
4 |
+
def calculate_percentage(*answers):
|
5 |
+
yes_count = sum(answers)
|
6 |
+
percentage = yes_count / len(answers) * 100
|
7 |
+
return f"{percentage}% Yes"
|
8 |
+
|
9 |
+
|
10 |
+
inputs = [gr.Checkbox(label=f"Question {i+1}") for i in range(100)]
|
11 |
+
output = gr.Textbox()
|
12 |
+
|
13 |
+
iface = gr.Interface(fn=calculate_percentage, inputs=inputs, outputs=output)
|
14 |
+
iface.launch()
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
gradio==4.5.0
|