File size: 618 Bytes
6d4f8a8 8361579 454e48d e375416 8361579 e375416 87eac61 e375416 87eac61 e375416 87eac61 454e48d 87eac61 6d4f8a8 e375416 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import gradio as gr
import pytesseract
pytesseract.pytesseract.tesseract_cmd = r'/usr/bin/tesseract'
def process_recipe(i,j):
text = pytesseract.image_to_string(Image.open(image))
return text
iface = gr.Interface(
fn=process_recipe,
inputs=[
gr.components.Image(type="filepath", label="Recipe Image"),
gr.components.Radio(choices=["Double","Triple", "Half", "Third"], label="Action")
],
outputs="text",
title="Recipe Modifier",
description="Upload an image of a recipe and choose how to modify the measurements.",
)
if __name__ == "__main__":
iface.launch()
|