Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -1,25 +1,43 @@
|
|
1 |
---
|
2 |
title: Generate With OpenAI CLIP
|
3 |
-
emoji:
|
4 |
colorFrom: red
|
5 |
colorTo: indigo
|
6 |
sdk: streamlit
|
7 |
-
sdk_version: 1.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: afl-3.0
|
11 |
---
|
12 |
|
13 |
-
#
|
14 |
-
**Created by:** *Lightning.ai*
|
15 |
|
|
|
|
|
|
|
16 |
|
17 |
-
|
18 |
|
19 |
-
-
|
20 |
-
-
|
21 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
## APPLICATION
|
24 |
|
25 |
-
Simple Streamlit app for playing '2 Lies and a truth' with the model and friends.
|
|
|
1 |
---
|
2 |
title: Generate With OpenAI CLIP
|
3 |
+
emoji: π¨π€πΌοΈ
|
4 |
colorFrom: red
|
5 |
colorTo: indigo
|
6 |
sdk: streamlit
|
7 |
+
sdk_version: 1.37.1
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: afl-3.0
|
11 |
---
|
12 |
|
13 |
+
# Image Understanding Model π¨π€
|
|
|
14 |
|
15 |
+
This application leverages OpenAI's CLIP (Contrastive Language-Image Pretraining) model to analyze images and match them with the most accurate text descriptions provided by the user.
|
16 |
+
It uses Streamlit to create an interactive web interface where users can upload images and input descriptions.
|
17 |
+
The model then predicts which description best fits the image based on probabilities.
|
18 |
|
19 |
+
## Features
|
20 |
|
21 |
+
- **Image Upload**: Users can upload an image (JPG, PNG, or JPEG).
|
22 |
+
- **Description Input**: Users input 3 descriptions about the image (e.g., 2 false and 1 true).
|
23 |
+
- **Prediction**: The model predicts the most likely description out of the three and provides a confidence score.
|
24 |
+
- **Progress Bar**: A visual progress bar displays the confidence of the best description.
|
25 |
+
|
26 |
+
## How It Works
|
27 |
+
|
28 |
+
1. **Upload an Image**: Users upload an image of their choice.
|
29 |
+
2. **Input Descriptions**: Users are prompted to enter 3 descriptions about the image, with 1 description being true.
|
30 |
+
3. **Model Prediction**: Once the descriptions are submitted, the CLIP model evaluates the image and the provided descriptions to predict which description best matches the image.
|
31 |
+
4. **Result Display**: The app displays the best-matching description and its corresponding probability, along with a progress bar showing the confidence of the prediction.
|
32 |
+
|
33 |
+
## Technology Stack
|
34 |
+
|
35 |
+
- **OpenAI CLIP**: The core model used for image and text understanding.
|
36 |
+
- **Torch**: Used for model inference and handling tensors.
|
37 |
+
- **Streamlit**: Provides the interactive web interface for uploading images and entering descriptions.
|
38 |
+
- **Pillow**: For handling image processing.
|
39 |
+
- **NumPy**: For efficient array and matrix operations.
|
40 |
|
41 |
## APPLICATION
|
42 |
|
43 |
+
Simple Streamlit app for playing '2 Lies and a truth' with the model and friends.
|