onuralpszr commited on
Commit
cba65f8
·
verified ·
1 Parent(s): 8d92093

feat: ✨ space library and text updates

Browse files

Signed-off-by: Onuralp SEZER <[email protected]>

Files changed (2) hide show
  1. app.py +6 -3
  2. requirements.txt +2 -1
app.py CHANGED
@@ -62,9 +62,12 @@ def process_image(input_image,input_text,class_names):
62
 
63
  app = gr.Interface(
64
  fn=process_image,
65
- inputs=[gr.Image(type="pil"),gr.Textbox(lines=2, placeholder="Enter text here..."),
66
- gr.Textbox(lines=1, placeholder="Enter class names separated by commas...")],
67
- outputs=[gr.Image(type="pil"), gr.Textbox()],
 
 
 
68
  title="PaliGemma2 Image Detection with Supervision",
69
  description="Detect objects in an image using PaliGemma2 model."
70
  )
 
62
 
63
  app = gr.Interface(
64
  fn=process_image,
65
+ inputs=[
66
+ gr.Image(type="pil", label="Input Image"),
67
+ gr.Textbox(lines=2, placeholder="Enter text here...", label="Enter prompt for example 'detect person;dog"),
68
+ gr.Textbox(lines=1, placeholder="Enter class names separated by commas...", label="Class Names")
69
+ ],
70
+ outputs=[gr.Image(type="pil", label="Annotated Image"), gr.Textbox(label="Detection Result")],
71
  title="PaliGemma2 Image Detection with Supervision",
72
  description="Detect objects in an image using PaliGemma2 model."
73
  )
requirements.txt CHANGED
@@ -2,4 +2,5 @@ supervision
2
  transformers==4.47.0
3
  requests
4
  tqdm
5
- gradio
 
 
2
  transformers==4.47.0
3
  requests
4
  tqdm
5
+ gradio
6
+ spaces