Spaces:
Sleeping
Sleeping
nukimayasari
commited on
Commit
•
326394b
1
Parent(s):
d57080c
Create app.py
Browse files
app.py
CHANGED
@@ -17,16 +17,16 @@ def predict_credit_score(interest_rate, num_credit_inquiries, delay_from_due_dat
|
|
17 |
prediction = model.predict(features)
|
18 |
return f"Predicted Credit Score Category: {int(prediction[0])}"
|
19 |
|
20 |
-
#
|
21 |
inputs = [
|
22 |
-
gr.
|
23 |
-
gr.
|
24 |
-
gr.
|
25 |
-
gr.
|
26 |
-
gr.
|
27 |
-
gr.
|
28 |
-
gr.
|
29 |
-
gr.
|
30 |
]
|
31 |
|
32 |
# Define a detailed description with the correct category explanation
|
@@ -42,5 +42,4 @@ Enter your details to get a prediction of your credit score category.
|
|
42 |
# Define the Gradio interface
|
43 |
gr.Interface(fn=predict_credit_score, inputs=inputs, outputs="text",
|
44 |
title="Credit Score Predictor",
|
45 |
-
description=description)
|
46 |
-
.launch()
|
|
|
17 |
prediction = model.predict(features)
|
18 |
return f"Predicted Credit Score Category: {int(prediction[0])}"
|
19 |
|
20 |
+
# Define the Gradio input interface with labeled inputs
|
21 |
inputs = [
|
22 |
+
gr.Number(label="Interest Rate"),
|
23 |
+
gr.Number(label="Number of Credit Inquiries"),
|
24 |
+
gr.Number(label="Days Delayed from Due Date"),
|
25 |
+
gr.Number(label="Number of Credit Cards"),
|
26 |
+
gr.Number(label="Number of Bank Accounts"),
|
27 |
+
gr.Number(label="Outstanding Debt"),
|
28 |
+
gr.Number(label="Number of Delayed Payments"),
|
29 |
+
gr.Number(label="Number of Loans")
|
30 |
]
|
31 |
|
32 |
# Define a detailed description with the correct category explanation
|
|
|
42 |
# Define the Gradio interface
|
43 |
gr.Interface(fn=predict_credit_score, inputs=inputs, outputs="text",
|
44 |
title="Credit Score Predictor",
|
45 |
+
description=description).launch()
|
|