Spaces:
Sleeping
Sleeping
gradio done
Browse files- app.py +21 -9
- flagged/log.csv +4 -0
app.py
CHANGED
@@ -1,11 +1,23 @@
|
|
1 |
from src.Pipeline.predict_pipe import Predict_Pipeline
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from src.Pipeline.predict_pipe import Predict_Pipeline
|
2 |
+
import gradio as gr
|
3 |
+
from src.exception import CustomException
|
4 |
|
5 |
+
obj = Predict_Pipeline()
|
6 |
+
|
7 |
+
demo = gr.Interface(obj.predict,
|
8 |
+
inputs= [
|
9 |
+
gr.Radio(["male","female"],label="Gender"),
|
10 |
+
gr.Dropdown(['group B' ,'group C' ,'group A' ,'group D' ,'group E'],label="Race"),
|
11 |
+
gr.Dropdown(["bachelor's degree" ,'some college' ,"master's degree", "associate's degree",
|
12 |
+
'high school' ,'some high school'],label="Parent Education"),
|
13 |
+
gr.Radio(['standard', 'free/reduced'],label="Lunch"),
|
14 |
+
gr.Radio(['none', 'completed'],label="Coaching"),
|
15 |
+
gr.Slider(0,100,label="writing Score"),
|
16 |
+
gr.Slider(0,100,label="reading score")],
|
17 |
+
outputs = "number"
|
18 |
+
)
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
if __name__ == "__main__":
|
23 |
+
demo.launch()
|
flagged/log.csv
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Gender,Race,Parent Education,Lunch,Coaching,writing Score,reading score,output,flag,username,timestamp
|
2 |
+
female,group A,some college,standard,none,70,19,27.75,,,2023-09-16 20:35:47.672461
|
3 |
+
Gender,Race,Parent Education,Lunch,Coaching,writing Score,reading score,output,flag,username,timestamp
|
4 |
+
female,group A,some college,standard,none,70,19,27.75,,,2023-09-16 20:35:47.672461
|