roborovski
commited on
Commit
•
113a69f
1
Parent(s):
4ccc2e8
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
---
|
5 |
+
|
6 |
+
# 🌔 moondream1
|
7 |
+
|
8 |
+
1.6B parameter model built by [@vikhyatk](https://x.com/vikhyatk) using SigLIP, Phi-1.5 and the LLaVa training dataset.
|
9 |
+
The model is release for research purposes only, commercial use is not allowed.
|
10 |
+
|
11 |
+
Try it out on [Huggingface Spaces](https://huggingface.co/spaces/vikhyatk/moondream1)!
|
12 |
+
|
13 |
+
**Usage**
|
14 |
+
|
15 |
+
```
|
16 |
+
pip install transformers timm einops
|
17 |
+
```
|
18 |
+
|
19 |
+
```python
|
20 |
+
from transformers import T5Tokenizer, T5ForConditionalGeneration
|
21 |
+
|
22 |
+
tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-small")
|
23 |
+
model = T5ForConditionalGeneration.from_pretrained("roborovksi/superprompt-v1", device_map="auto")
|
24 |
+
|
25 |
+
input_text = "Expand the following prompt to add more detail: A storefront with 'Text to Image' written on it."
|
26 |
+
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
|
27 |
+
|
28 |
+
outputs = model.generate(input_ids)
|
29 |
+
print(tokenizer.decode(outputs[0]))
|
30 |
+
|
31 |
+
# The neon sign above the storefront reads "NeurIPS" in bold, white letters. The storefront is surrounded by a bustling cityscape, with skyscrapers and neon signs lining the walls. The sign is surrounded by a variety of colorful goods, including a variety of fruits, vegetables, and fruits, all arranged in a neat and organized manner. The storefront is surrounded by a bustling crowd of people, all chatting and laughing as they go about their daily routines.
|
32 |
+
|
33 |
+
```
|
34 |
+
|
35 |
+
|
36 |
+
## Examples
|
37 |
+
|
38 |
+
| Image | Examples |
|
39 |
+
| --- | --- |
|
40 |
+
| ![](assets/demo-1.jpg) | **What is the title of this book?**<br>The Little Book of Deep Learning<br><br>**What can you tell me about this book?**<br>The book in the image is titled "The Little Book of Deep Learning." It appears to be a guide or manual that provides information and instructions on the subject of deep learning. The book is described as being small and thin, making it easy to carry and read. It is set in a room with a view outside, suggesting that the person holding the book might be in a living or working space with a view. The content of the book is likely to be complex, as the title implies a focus on advanced concepts in deep learning.<br><br>**Where is the person standing?**<br> The person is standing on a balcony or deck, which is outside. |
|
41 |
+
| ![](assets/demo-2.jpg) | **What type of food is the girl holding?**<br>The girl is holding a hamburger.<br><br>**What color is the woman's hair?**<br>The woman's hair is white.<br><br>**What is the girl doing in the image?**<br>The girl in the image is eating a hamburger. |
|
42 |
+
| ![](assets/demo-3.jpg) | **What color is the train?**<br>The train is red.<br><br>**What is the bus doing in the image?**<br> The bus in the image is driving down a city street, passing through an intersection.<br><br>**What kind of public transportation is in the image?**<br>The image features a red train or trolley as the public transportation option. |
|
43 |
+
| ![](assets/demo-4.jpg) | **What is the girl looking at?**<br>The girl is looking at her reflection in the mirror.<br><br>**What color is the woman's hair?**<br>The woman's hair is brown.<br><br>**What is the woman doing in the mirror?**<br>The woman is adjusting her hair in the mirror. |
|
44 |
+
| ![](assets/demo-5.jpg) | **What might be the reason for the dog's aggressive behavior?**<br>The dog's aggressive behavior, including its growling, baring its teeth, and showing its sharp teeth, could be due to various reasons. It is possible that the dog is feeling threatened, scared, or defensive about something in its environment, such as another animal, a loud noise, or a person nearby. Alternatively, the dog might be reacting to a command it received from its owner, or it could be experiencing discomfort or pain, which is causing it to display aggressive behavior. It is essential to observe the dog's body language and context to determine the underlying cause of its aggressive behavior and respond accordingly to address its needs or concerns.<br><br>**What kind of dog is in the picture?**<br>The dog in the picture is a small, black and white chihuahua. |
|