import gradio as gr import pytesseract def process(image, lang): try: return pytesseract.image_to_string(image, lang=lang) except Exception as e: return str(e) choices = pytesseract.get_languages() interface = gr.Interface( process, [gr.Image(type="filepath"), gr.Dropdown(label="Select Language", choices=choices, type="value")], outputs="text", css="footer {visibility: hidden}", title="Optical Character Recognition | Image To Text", article = """
Hello, thanks for coming, visit our tools: Genelify
""" ) interface.launch()