bcvilnrotter commited on
Commit
e2f2387
·
verified ·
1 Parent(s): 08fa905

Upload 2 files

Browse files
Files changed (2) hide show
  1. README.md +1 -0
  2. app.py +21 -0
README.md ADDED
@@ -0,0 +1 @@
 
 
1
+ # id-code-identifier
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os,json,sys
2
+ import gradio as gr
3
+ sys.path.insert(0,os.path.abspath(os.path.join(os.path.dirname(__file__),'..')))
4
+ from utils.basic_functions import get_image,gemini_identify_id,huggingface_detect_id_box
5
+
6
+ def main():
7
+
8
+ demo = gr.Interfact(
9
+ fn=huggingface_detect_id_box,
10
+ inputs=[
11
+ gr.Textbox(label='Huggingface Model Name',placeholder='llava-hf/llava-1.5-7b-hf'),
12
+ gr.Textbox(label="Image URL",placeholder="https://cumberland.isis.vanderbilt.edu/stefan/rvlcdip/test_advertisement_127238fe-8352-49ed-8c5f-11488a154dd2.jpg")
13
+ ],
14
+ outpust=gr.Image(label="Image with ID bounding box"),
15
+ title="Huggingface LLM for ID Number Detection"
16
+ )
17
+
18
+ demo.launch()
19
+
20
+ if __name__ == "__main__":
21
+ main()