Spaces:
Sleeping
Sleeping
File size: 760 Bytes
5e1b42b 2fcecc6 5e1b42b e2f2387 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import os,json,sys
import gradio as gr
sys.path.insert(0,os.path.abspath(os.path.join(os.path.dirname(__file__),'..')))
from utils.basic_functions import get_image,gemini_identify_id,huggingface_detect_id_box
def main():
demo = gr.Interface(
fn=huggingface_detect_id_box,
inputs=[
gr.Textbox(label='Huggingface Model Name',placeholder='llava-hf/llava-1.5-7b-hf'),
gr.Textbox(label="Image URL",placeholder="https://cumberland.isis.vanderbilt.edu/stefan/rvlcdip/test_advertisement_127238fe-8352-49ed-8c5f-11488a154dd2.jpg")
],
outputs=gr.Image(label="Image with ID bounding box"),
title="Huggingface LLM for ID Number Detection"
)
demo.launch()
if __name__ == "__main__":
main() |