Spaces:
Running
on
Zero
Running
on
Zero
import gradio as gr | |
def get_diamond_form(): | |
with gr.Row(): | |
carat = gr.Number(value=1.0, label="Carat") | |
cut = gr.Textbox(label="Cut") | |
color = gr.Textbox(label="Color") | |
clarity = gr.Textbox(label="Clarity") | |
depth = gr.Number(value=1.0, label="Depth") | |
return [carat, cut, color, clarity, depth] | |
def get_brand_product_form(): | |
with gr.Row(): | |
brand_name = gr.Textbox(label="Brand Name") | |
model_name = gr.Textbox(label="Model Name") | |
type_number = gr.Textbox(label="Type Number") | |
purchase_store = gr.Textbox(label="Purchase Store") | |
purchase_date = gr.DatePicker(label="Purchase Date") | |
purchase_price = gr.Number(value=1000.0, label="Purchase Price") | |
accessories = gr.Textbox(label="Accessories") | |
condition = gr.Textbox(label="Condition") | |
return [brand_name, model_name, type_number, purchase_store, purchase_date, purchase_price, accessories, condition] | |
gr_interface = gr.Interface( | |
fn=None, | |
inputs=[get_diamond_form(), get_brand_product_form()], | |
outputs="text", | |
title="Diamond and Brand Product Appraisal", | |
description="Please fill in the required information for appraisal." | |
) | |
gr_interface.launch() |