import gradio as gr | |
def predict(input_image): | |
""" | |
Predict model output | |
""" | |
price = "0" | |
return [input_image, price] | |
with gr.Blocks() as demo: | |
# Title | |
gr.Markdown( | |
""" | |
<h1 align="center">AI Cafeteria Price Evaluator</h1> | |
""") | |
# Model Evaluation | |
gr.Interface( | |
fn=predict, | |
inputs=gr.Image(type="pil"), | |
outputs=[gr.Image(type="pil", label="Image Prediction"), | |
gr.Textbox(type="text", label="Price Prediction")] | |
) | |
if __name__ == "__main__": | |
demo.launch() | |