anas-awadalla commited on
Commit
4117d39
1 Parent(s): 6f405c5
This view is limited to 50 files because it contains too many changes.   See raw diff
app.py ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import os
3
+
4
+ pwd = os.getcwd()
5
+ jpg_files = [f for f in os.listdir(os.path.join(pwd, 'images')) if f.endswith('.jpg')]
6
+ # Sort the files by name
7
+ jpg_files = sorted(jpg_files, key=lambda x: int(x.split('.')[0]))
8
+ txt_files = [f for f in os.listdir(os.path.join(pwd, 'images')) if f.endswith('.txt')]
9
+ # Sort the files by name
10
+ txt_files = sorted(txt_files, key=lambda x: int(x.split('.')[0]))
11
+
12
+ # Session state to keep track of the current file index
13
+ if 'file_index' not in st.session_state:
14
+ st.session_state.file_index = 0
15
+
16
+ # Display "Previous" and "Next" buttons
17
+ col1, col2 = st.columns(2)
18
+ if col1.button("Previous"):
19
+ st.session_state.file_index -= 1
20
+ st.session_state.file_index = max(0, st.session_state.file_index)
21
+ if col2.button("Next"):
22
+ st.session_state.file_index += 1
23
+ st.session_state.file_index = min(len(jpg_files) - 1, st.session_state.file_index)
24
+ st.markdown(f"**File {st.session_state.file_index + 1} of {len(jpg_files)}**")
25
+ st.text("")
26
+ st.text("")
27
+
28
+ # Display the image and text
29
+ jpg_file = jpg_files[st.session_state.file_index]
30
+ txt_file = txt_files[st.session_state.file_index]
31
+
32
+ st.image(os.path.join(pwd, 'images', jpg_file))
33
+ with open(os.path.join(pwd, 'images', txt_file)) as f:
34
+ text = f.read()
35
+ generated_caption = text.split('\n')[0]
36
+ laion_caption = text.split('\n')[1]
37
+
38
+ st.markdown(f"**Generated Caption:** {generated_caption}")
39
+ st.markdown(f"**Loss:** {laion_caption}")
images/000000000.jpg ADDED
images/000000000.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "https://us.123rf.com/450wm/rudall30/rudall301209/rudall30120900034/15323517-a-samurai-in-carved-style-illustration.jpg?ver=6",
3
+ "key": "000000000",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 450,
7
+ "height": 450,
8
+ "original_width": 450,
9
+ "original_height": 450,
10
+ "exif": "{}",
11
+ "sha256": "492c6f79707f3a07bb83fd7980a92aab264562c98a8786d89ea2fdbd2f1ccca4"
12
+ }
images/000000000.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ The image depicts a stylized illustration of a warrior, possibly of Japanese origin, in a combat stance. The warrior is wearing traditional samurai armor, complete with layered plates and a helmet adorned with a pair of curved horns. The warrior is holding a long sword in a defensive or preparatory position. The color scheme is monochromatic, with the warrior and the background both being shades of brown.
2
+ warrior pose: A samurai in carved style illustration
images/000000001.jpg ADDED
images/000000001.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "https://static1.bigstockphoto.com/thumbs/2/3/1/large2/132474176.jpg",
3
+ "key": "000000001",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 450,
7
+ "height": 311,
8
+ "original_width": 450,
9
+ "original_height": 311,
10
+ "exif": "{}",
11
+ "sha256": "fc4ca1dd36f848ded0e4b7d0ec71f412665bbbfc146900ceaec33e59276da4f6"
12
+ }
images/000000001.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ This image showcases a close-up view of a red sports car, possibly a Ferrari, based on the iconic emblem on the side. The car is parked on a street, and the background includes a building and a sidewalk. The car's body is sleek and shiny, reflecting the surroundings. The windshield is tinted, and the side mirror is also reflective. The wheels are black with red accents, and the brake calipers are visible. The emblem, which is a prancing horse in a yellow shield, is a signature symbol of Ferrari.
2
+ DUBAI, UAE - MAY 15, 2016: close up of Ferrari 458 Italia on road in Dubai
images/000000002.jpg ADDED
images/000000002.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "http://i01.i.aliimg.com/wsphoto/v0/1467463029/10_spring_and_autumn_120d_velvet_pantyhose_socks_thermal_thick_wire_socks_candy_color.jpg_200x200.jpg",
3
+ "key": "000000002",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 200,
7
+ "height": 199,
8
+ "original_width": 200,
9
+ "original_height": 199,
10
+ "exif": "{}",
11
+ "sha256": "1dace7ab7d1a2f5f8007b61143d699d173ff705642e69466c3bc507058914732"
12
+ }
images/000000002.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ This image appears to be an advertisement or promotional material. It features a pair of legs wearing heels, and next to the legs, there are rolls of colorful tights or stockings. Above the legs, there is text in Chinese characters, and below the legs, there is more text in Chinese characters along with numbers, possibly indicating the price or quantity.
2
+ 10 spring and autumn 120d velvet pantyhose socks thermal thick wire socks candy color
images/000000003.jpg ADDED
images/000000003.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "https://imgs.mkdress.co.uk/s330/52/57/9ffb613b277ee82819a4ce56b5175257.jpg",
3
+ "key": "000000003",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 330,
7
+ "height": 446,
8
+ "original_width": 330,
9
+ "original_height": 446,
10
+ "exif": "{}",
11
+ "sha256": "d07cf164053c356f246d669ac82fbc7cd07b62183d7684a16d02dbafa26c84a5"
12
+ }
images/000000003.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ This image is a collage of three different pictures. The first picture shows a white dress on a mannequin against a backdrop of wooden shutters. The second picture is a close-up of the dress's back, highlighting the intricate beadwork and the crisscross design of the straps. The third picture is a close-up of the lower part of the dress, showing the delicate lace detailing.
2
+ Straps A-Line/Princess Flower Girl Dresses Tulle Beading Sleeveless Sweep Train
images/000000004.jpg ADDED
images/000000004.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "https://cdn.shopify.com/s/files/1/0020/2270/3156/products/Hang_Loose_Trucker_Hats-9_300x300.jpg?v=1530301188",
3
+ "key": "000000004",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 300,
7
+ "height": 278,
8
+ "original_width": 300,
9
+ "original_height": 278,
10
+ "exif": "{\"Image Orientation\": \"Horizontal (normal)\", \"Image XResolution\": \"300\", \"Image YResolution\": \"300\", \"Image ResolutionUnit\": \"Pixels/Inch\", \"Image YCbCrPositioning\": \"Centered\", \"Image ExifOffset\": \"102\", \"EXIF ExifVersion\": \"\", \"EXIF ComponentsConfiguration\": \"\", \"EXIF FlashPixVersion\": \"\", \"EXIF ColorSpace\": \"Uncalibrated\", \"EXIF ExifImageWidth\": \"300\", \"EXIF ExifImageLength\": \"278\"}",
11
+ "sha256": "8e6d51571b3de49fb4a660fc861e22b50a9d810d54d0a92674d1d91f977bc627"
12
+ }
images/000000004.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ This image showcases a black trucker hat placed on a rocky surface with a beach and mountain in the background. The hat has a red logo on it that reads 'Hang Loose Surf Club' with the text 'Maui, Hawaii' below it. The logo is a stylized hand gesture known as the 'shaka' sign.
2
+ Surf Hat - Black w/ Red metallic print
images/000000005.jpg ADDED
images/000000005.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "https://www.picclickimg.com/d/l400/pict/223533701171_/Genuine-Original-BMC-Austin-Morris-1100-1300-Fuel.jpg",
3
+ "key": "000000005",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 80,
7
+ "height": 80,
8
+ "original_width": 80,
9
+ "original_height": 80,
10
+ "exif": "{}",
11
+ "sha256": "a567462f4edd496bdf5cd00da5bbde64131c283e3cf396bfd58c0fac26b13d9a"
12
+ }
images/000000005.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ The image appears to be a screenshot of a mobile application interface. The top of the screen displays a navigation bar with icons for social media platforms like Facebook and Instagram, as well as other icons that might be related to the app's functionalities. The main content area of the screen is titled 'My Lists' and below it, there are two lists visible. The first list is titled 'Favorite' and the second list is titled 'Wishlist'. Each list has a count of items, with 'Favorite' having 1 item and 'Wishlist' having 2 items.
2
+ Genuine Original BMC Austin / Morris 1100/1300 Fuel Guage in original box 13H972
images/000000006.jpg ADDED
images/000000006.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "https://www.supercartribe.com/wp-content/uploads/2018/09/SupercarTribe-Friday-Drool-Ferrari-F40-18-400x284.jpg",
3
+ "key": "000000006",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 400,
7
+ "height": 284,
8
+ "original_width": 400,
9
+ "original_height": 284,
10
+ "exif": "{}",
11
+ "sha256": "440382a4a3dcc1c8d3f8f436a814b634e939eaf2c23168759acc0fe3ee3c0d8f"
12
+ }
images/000000006.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ The image showcases a vibrant red sports car, possibly a Ferrari, displayed in a showroom or exhibition setting. The car has a sleek design with prominent side skirts, a rear spoiler, and a distinctive logo on the side. The wheels are silver with multi-spoke designs. The car's interior is not visible, but the exterior is polished and reflective, indicating a high-quality finish.
2
+ SupercarTribe Friday Drool - Ferrari F40 (18)
images/000000007.jpg ADDED
images/000000007.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "https://www.arbuildjunkie.com/wp-content/uploads/2019/06/anderson-stripped-lower-no-logo-ghost-1-475x234.jpg",
3
+ "key": "000000007",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 475,
7
+ "height": 234,
8
+ "original_width": 475,
9
+ "original_height": 234,
10
+ "exif": "{}",
11
+ "sha256": "aa20eb9992ab1d5b57a93ca88fa6e421fd62b49043f93d26aa3f9e5c0f937bc9"
12
+ }
images/000000007.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ The image displays a black, stripped lower receiver of a firearm. It has multiple holes and engravings, including a logo or text on the left side. The receiver appears to be made of a hard, possibly metal material, and has a smooth, polished finish.
2
+ Anderson Stripped Lower Receiver – No Logo
images/000000008.jpg ADDED
images/000000008.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "https://fanatics.frgimages.com/FFImage/thumb.aspx?i=/productimages/_2756000/ff_2756599_full.jpg&w=340",
3
+ "key": "000000008",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 512,
7
+ "height": 512,
8
+ "original_width": 2000,
9
+ "original_height": 2000,
10
+ "exif": "{}",
11
+ "sha256": "8fb2d4dc8ef3efaa959219cc26b026f0371339d48e044041880a7ce099a5a01f"
12
+ }
images/000000008.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ This image showcases a blue baseball cap with a logo on the front. The logo appears to be a stylized depiction of a creature, possibly a mythical or fantastical animal, in a dynamic pose. The cap has a relaxed fit, and there is a small logo or symbol on the right side of the cap, possibly indicating the brand or manufacturer.
2
+ Men's Indianapolis Colts NFL Pro Line by Fanatics Branded Royal Vintage Fundamental Adjustable Hat
images/000000009.jpg ADDED
images/000000009.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "http://i1.cpcache.com/product/352944973/pink_grandma_09_225_button_10_pack.jpg?height=160&width=160",
3
+ "key": "000000009",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 160,
7
+ "height": 160,
8
+ "original_width": 160,
9
+ "original_height": 160,
10
+ "exif": "{}",
11
+ "sha256": "4e0c016e41a98c29e57d443b8fd4f064a4b4c9bdd7eaab5b710a12bad270f749"
12
+ }
images/000000009.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ This image is a button or badge that appears to be a decorative piece. It has a white background with the word 'GRANDMA' written in bold pink letters at the top. Below the word 'GRANDMA', there is a number '09' also in bold pink letters. The design seems to be a playful take on a sports jersey, suggesting a fun and lighthearted theme.
2
+ "Pink Grandma 09 2.25"" Button (10 pack)"
images/000000011.jpg ADDED
images/000000011.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "http://0.s3.envato.com/files/48806026/Zebrod%20Design%20Logo-Thumbnail-01.png",
3
+ "key": "000000011",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 80,
7
+ "height": 80,
8
+ "original_width": 80,
9
+ "original_height": 80,
10
+ "exif": "{}",
11
+ "sha256": "2e95c63490d3278369c1c984e3c7549d6b993801e3694e1d844d34ba9ec47265"
12
+ }
images/000000011.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ This image is a logo design. It features a stylized letter 'Z' inside a semi-circle, with a smaller letter 'H' intersecting it diagonally. The background is white, and the text 'ZebrodDesign' is written below the logo, with the tagline 'Tagline Goes Here' placed above it. The color scheme consists of black and orange.
2
+ Zebrod Design Logo Template - GraphicRiver Item for Sale
images/000000012.jpg ADDED
images/000000012.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "https://t.chzbgr.com/ThumbnailCache/maxW290/i.chzbgr.com/completestore/2011/5/17/a5289639-707e-45a3-92d1-b0925e8d9c36.jpg",
3
+ "key": "000000012",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 290,
7
+ "height": 239,
8
+ "original_width": 290,
9
+ "original_height": 239,
10
+ "exif": "{}",
11
+ "sha256": "50564bd2835a9a879ac30915f66a8c6dc3cd031c7561335cb7fb9a974eb60da2"
12
+ }
images/000000012.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ This image appears to be a humorous or satirical news broadcast. It features a shelf with multiple cats resting or sleeping in different compartments. The shelf is placed against a wooden wall. At the top, there is a blue banner with the text 'Breaking News' and below it, a subtitle that reads 'LIVE Kitteh Inn Franchise Takes Off - More at 11'. The bottom right corner has a logo that says 'TW', which might indicate the source or channel of this fictional news broadcast.
2
+ Breaking News - Kitteh Inn Franchise Takes Off - More at 11
images/000000015.jpg ADDED
images/000000015.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "https://ff326f815d466bd3e636-edb2c5df7885b8ac8552b41a8e084f0c.ssl.cf1.rackcdn.com//thumbnails/5J8TB3H58JL013105/87f2b5fc62890a771884616058c445e4.jpg",
3
+ "key": "000000015",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 480,
7
+ "height": 360,
8
+ "original_width": 480,
9
+ "original_height": 360,
10
+ "exif": "{}",
11
+ "sha256": "87c6ecfa380b8933a8d29290a954a1fd55fd8c6a562db00c0834d8c3aaefec04"
12
+ }
images/000000015.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ This image showcases a white Acura RDX SUV parked inside a garage or warehouse. The vehicle is positioned in the foreground, and its sleek design is prominently displayed. The background reveals a spacious interior with various items, possibly equipment or storage, scattered around. There's a logo at the bottom left corner that reads 'Acura Columbus', indicating the dealership or the location where the vehicle is available. Additionally, there's a phone number and website address provided, suggesting that this is an advertisement or promotional image for the dealership.
2
+ New Acura RDX with Technology Package
images/000000017.jpg ADDED
images/000000017.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "http://supplementstown.com/wp-content/uploads/2017/10/factors-to-get-rid-of-face-fat.jpg",
3
+ "key": "000000017",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 580,
7
+ "height": 380,
8
+ "original_width": 580,
9
+ "original_height": 380,
10
+ "exif": "{}",
11
+ "sha256": "7829af44c764a40adeb1d06c17d4d6ea406a4a6310532f255dee009f6f436e77"
12
+ }
images/000000017.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ This image is a side-by-side comparison of a woman's face at two different angles. The left side of the image shows the woman's face from a frontal angle, while the right side shows a slightly angled view, emphasizing the contours of her face. Overlaying the images is text that reads 'Struggling with face fat? Factors contributing to a Fat face.' The text seems to be a humorous or informative caption, suggesting that the image is meant to educate or entertain viewers about factors that can contribute to face fat.
2
+ get rid of face fat
images/000000018.jpg ADDED
images/000000018.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "https://i.ebayimg.com/00/s/MTAyNFg3Njg=/z/K~EAAOSwBt5ZKbd~/$_99.JPG",
3
+ "key": "000000018",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 200,
7
+ "height": 150,
8
+ "original_width": 200,
9
+ "original_height": 150,
10
+ "exif": "{}",
11
+ "sha256": "ed7d18ab36081de3f44327157605d1aa47901ed58f08d7d2458ca48b6b936169"
12
+ }
images/000000018.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ The image showcases a white gas cooker with multiple burners on the top and two oven compartments below. The oven compartments are black, and there are several dials and buttons on the front of the cooker. The cooker is placed against a light-colored wall, and there appears to be some kind of protective plastic or sheet in front of the burners.
2
+ Cannon electric/gas cooker
images/000000019.jpg ADDED
images/000000019.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "url": "http://wecoloringpage.com/wp-content/uploads/2017/09/Cute-Horse-Flower-In-The-Flower-Mouth-Coloring-Page-160x120.jpg",
3
+ "key": "000000019",
4
+ "status": "success",
5
+ "error_message": null,
6
+ "width": 160,
7
+ "height": 120,
8
+ "original_width": 160,
9
+ "original_height": 120,
10
+ "exif": "{}",
11
+ "sha256": "e44921fd1aaf3bd7e11f7c9bf24148d464295665bdd7ae8477336a4d6c44f737"
12
+ }
images/000000019.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ This image is a simple black and white line drawing of a cartoon character. The character appears to be a horse or a similar four-legged creature, with a large head and a long neck. The horse is holding a flower in its mouth, and there is a small tuft of hair or mane on the top of its head. The drawing is minimalistic, with only basic shapes and lines used to define the character and its features.
2
+ Cute Horse Flower In The Flower Mouth Coloring Page
images/000000020.jpg ADDED