Spaces:
Sleeping
Sleeping
test with gradio_client
Browse files28 unmodified lines29303132333435363738394041424344454647484950515253545556575859606162636465666728 unmodified lines}response = client.post(input_dict)# r = requests.post(client, json=payload)return response###with gr.Blocks() as demo:gr.Markdown("# Loan Status Classifier")inputs = [gr.Slider(1000, 100000, label="Loan Original Amount"),gr.Slider(100, 2000, step=1, label='Credit Score Range (Lower)'),gr.Slider(1000, 100000, step=10, label="Stated Monthly Income"),gr.Slider(0, 1000, step=1, label='Number of Investors'),gr.Slider(20, 5000, step=5, label="Monthly Loan Payment")]# a = gr.Slider(1000,100000,label="Loan Amount")# b = gr.Slider(100,2000,label="Credit Score")# c = gr.Slider(1000,100000,label="Income")# d = gr.Slider(0,1000,label="Investors")# e = gr.Slider(20,5000,label="Monthly Payment")output = gr.Textbox()btn = gr.Button("Predict")# btn.click(predict,[inputs],output)gr.Interface(fn=predict, inputs=inputs, outputs=output)demo.launch()28 unmodified lines29303132333435363738394041424344454647484950515253545556575828 unmodified lines}response = client.predict(input_dict)# r = requests.post(client, json=payload)return responseinputs = [gr.Slider(1000, 100000, label="Loan Original Amount"),gr.Slider(100, 2000, step=1, label='Credit Score Range (Lower)'),gr.Slider(1000, 100000, step=10, label="Stated Monthly Income"),gr.Slider(0, 1000, step=1, label='Number of Investors'),gr.Slider(20, 5000, step=5, label="Monthly Loan Payment")]options = ['Current', 'Completed', 'ChargedOff']outputs = gr.Label()title = "Loan Status Classifier"description = ("Enter the details of the loan to check the status of the loan.")gr.Interface(fn=predict,inputs=inputs,outputs=outputs,title=title,description=description,).launch()
app.py+22-31