andito HF staff commited on
Commit
1f3cc30
·
1 Parent(s): f3b9c11

changed examples

Browse files
.gitattributes CHANGED
@@ -36,3 +36,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
36
  example_images/docvqa_example.png filter=lfs diff=lfs merge=lfs -text
37
  example_images/gaulois.png filter=lfs diff=lfs merge=lfs -text
38
  example_images/rococo.jpg filter=lfs diff=lfs merge=lfs -text
 
 
36
  example_images/docvqa_example.png filter=lfs diff=lfs merge=lfs -text
37
  example_images/gaulois.png filter=lfs diff=lfs merge=lfs -text
38
  example_images/rococo.jpg filter=lfs diff=lfs merge=lfs -text
39
+ *.DS_Store filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -56,7 +56,6 @@ def model_inference(
56
  "attention_mask": inputs.attention_mask,
57
  "num_return_sequences": 1,
58
  "no_repeat_ngram_size": 2,
59
- "temperature": 0.7,
60
  "max_new_tokens": 500,
61
  "min_new_tokens": 10,
62
  }
@@ -82,14 +81,17 @@ def model_inference(
82
 
83
 
84
  examples=[
85
- [{"text": "What art era do these artpieces belong to?", "files": ["example_images/rococo.jpg", "example_images/rococo_1.jpg"]}, "Greedy", 0.4, 512, 1.2, 0.8],
86
- [{"text": "I'm planning a visit to this temple, give me travel tips.", "files": ["example_images/examples_wat_arun.jpg"]}, "Greedy", 0.4, 512, 1.2, 0.8],
87
- [{"text": "What is the due date and the invoice date?", "files": ["example_images/examples_invoice.png"]}, "Greedy", 0.4, 512, 1.2, 0.8],
88
- [{"text": "What is this UI about?", "files": ["example_images/s2w_example.png"]}, "Greedy", 0.4, 512, 1.2, 0.8],
89
- [{"text": "Where do the severe droughts happen according to this diagram?", "files": ["example_images/examples_weather_events.png"]}, "Greedy", 0.4, 512, 1.2, 0.8],
 
 
 
90
  ]
91
- demo = gr.ChatInterface(fn=model_inference, title="SmolVLM: Small yet Mighty 💫",
92
- description="Play with [HuggingFaceTB/SmolVLM-Instruct](https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct) in this demo. To get started, upload an image and text or try one of the examples. This checkpoint works best with single turn conversations, so clear the conversation after a single turn.",
93
  examples=examples,
94
  textbox=gr.MultimodalTextbox(label="Query Input", file_types=["image"], file_count="multiple"), stop_btn="Stop Generation", multimodal=True,
95
  cache_examples=False
 
56
  "attention_mask": inputs.attention_mask,
57
  "num_return_sequences": 1,
58
  "no_repeat_ngram_size": 2,
 
59
  "max_new_tokens": 500,
60
  "min_new_tokens": 10,
61
  }
 
81
 
82
 
83
  examples=[
84
+ [{"text": "Describe this image.", "files": ["example_images/newyork.jpg"]}],
85
+ [{"text": "Describe this image.", "files": ["example_images/dogs.jpg"]}],
86
+ [{"text": "Where do the severe droughts happen according to this diagram?", "files": ["example_images/examples_weather_events.png"]}],
87
+ [{"text": "What art era do these artpieces belong to?", "files": ["example_images/rococo.jpg", "example_images/rococo_1.jpg"]}],
88
+ [{"text": "Describe this image.", "files": ["example_images/campeones.jpg"]}],
89
+ [{"text": "What does this say?", "files": ["example_images/math.jpg"]}],
90
+ [{"text": "What is the date in this document?", "files": ["example_images/document.jpg"]}],
91
+ [{"text": "What is this UI about?", "files": ["example_images/s2w_example.png"]}],
92
  ]
93
+ demo = gr.ChatInterface(fn=model_inference, title="SmolVLM-250M: The Smollest VLM ever 💫",
94
+ description="Play with [HuggingFaceTB/SmolVLM-Instruct-250M](https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct-250M) in this demo. To get started, upload an image and text or try one of the examples. This demo doesn't use history for the chat, so every chat you start is a new conversation.",
95
  examples=examples,
96
  textbox=gr.MultimodalTextbox(label="Query Input", file_types=["image"], file_count="multiple"), stop_btn="Stop Generation", multimodal=True,
97
  cache_examples=False
example_images/campeones.jpg ADDED
example_images/document.jpg ADDED
example_images/docvqa_example.png DELETED

Git LFS Details

  • SHA256: b09feb5f7fbd60c089562ee1e30292a9902861af576f8824b2315e88653e2cf5
  • Pointer size: 132 Bytes
  • Size of remote file: 1.25 MB
example_images/dogs.jpg ADDED
example_images/examples_wat_arun.jpg DELETED
Binary file (786 kB)
 
example_images/math.jpg ADDED
example_images/newyork.jpg ADDED