patrickvonplaten commited on
Commit
a1406a7
β€’
1 Parent(s): d6b17c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +47 -7
app.py CHANGED
@@ -26,6 +26,38 @@ LINKS = {
26
  "if-v1-0": "https://huggingface.co/DeepFloyd/IF-I-XL-v1.0",
27
  "karlo": "https://huggingface.co/kakaobrain/karlo-v1-alpha",
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  NUM_QUESTIONS = 10
30
  MODEL_KEYS = "-".join(SUBMISSIONS.keys())
31
  SUBMISSION_ORG = f"results-{MODEL_KEYS}"
@@ -170,7 +202,7 @@ def change_view(row_number, dataframe):
170
  intro_view: gr.update(visible=True),
171
  result_view: gr.update(visible=True),
172
  gallery_view: gr.update(visible=False),
173
- result: f"You are of type: [**{favorite_model}**]({LINKS[favorite_model]}) πŸ”₯",
174
  }
175
  else:
176
  return {
@@ -181,19 +213,27 @@ def change_view(row_number, dataframe):
181
  }
182
 
183
 
184
- TITLE = "# Open Parti Prompts - Who is your open-source genAI model?"
 
185
  DESCRIPTION = """
186
- *This is an interactive game in which you click through pre-generated images from SD-v1-5, SD-v2.1, Karlo, and IF
187
- using [Parti Prompts](https://huggingface.co/datasets/nateraw/parti-prompts) prompts.* \n
188
- *You choices will go into the official [Parti Prompts Leaderboard](https://huggingface.co/spaces/OpenGenAI/parti-prompts-leaderboard) ❀️.*
189
  """
190
  EXPLANATION = """\n\n
191
- ## How it works πŸ“– \n\n
192
 
193
  1. Click on 'Start'
194
  2. A prompt and 4 different images are displayed
195
  3. Select your favorite image
196
- 4. After 10 rounds your favorite diffusion model is displayed
 
 
 
 
 
 
 
197
  """
198
 
199
  GALLERY_COLUMN_NUM = len(SUBMISSIONS)
 
26
  "if-v1-0": "https://huggingface.co/DeepFloyd/IF-I-XL-v1.0",
27
  "karlo": "https://huggingface.co/kakaobrain/karlo-v1-alpha",
28
  }
29
+ SD_1_5_RESULT = """
30
+ ![img](https://huggingface.co/datasets/OpenGenAI/logos/blob/main/37351293.png)
31
+ "The traditional one πŸ”₯! You mostly resonate with **Stable Diffusion 1-5** released by RunwayML.
32
+ \n Stable Diffusion 1-5 is the most used open-source text-to-image model offering an amazing speed-to-image-quality trade-off!
33
+ Check out your soulmate [here](https://huggingface.co/runwayml/stable-diffusion-v1-5).
34
+ """
35
+ SD_2_1_RESULT = """
36
+ ![img](https://huggingface.co/datasets/OpenGenAI/logos/resolve/main/7vmYr2XwVcPtkLzac_jxQ.png)
37
+ "The creative one 🎨! You mostly resonate with **Stable Diffusion 2-1** released by Stability AI.
38
+ \n Stable Diffusion 2-1 is the latest open-source release of Stable Diffusion and allows to render stunning images of much larger sizes than Stable Diffusion v1.
39
+ Try it out [here](https://huggingface.co/stabilityai/stable-diffusion-2-1).
40
+ """
41
+ IF_V1_0 = """
42
+ ![img](https://huggingface.co/datasets/OpenGenAI/logos/blob/main/1662453741854-63170739dc97a974718be2c7.png)
43
+ The powerful one ⚑! You mostly resonate with **IF v1-0** released by DeepFloyd.
44
+ \n IF v1-0 is by far the largest of the open-sourced text-to-image models and is a very powerful image generator.
45
+ Besides being able to generate multiple complex concepts in the same image, IF v1-0 is also extremely good at generating text in images.
46
+ Check out your new best friend [here](https://huggingface.co/DeepFloyd/IF-I-XL-v1.0)
47
+ """
48
+ KARLO = """
49
+ ![img](https://huggingface.co/datasets/OpenGenAI/logos/blob/main/1670220967262-615ed619c807b26d117a49bd.png)
50
+ The precise one 🎯! You mostly resonate with **Karlo** released by KakaoBrain.
51
+ \n Karlo is based on the same architecture as DALLE-2 and has been trained on the [well curated COYO dataset](https://huggingface.co/datasets/kakaobrain/coyo-700m).
52
+ Play around with it [here]("https://huggingface.co/kakaobrain/karlo-v1-alpha").
53
+ """
54
+
55
+ RESULT = {
56
+ "sd-v1-5": SD_1_5_RESULT,
57
+ "sd-v2-1": SD_2_1_RESULT,
58
+ "if-v1-0": IF_V1_0,
59
+ "karlo": KARLO,
60
+ }
61
  NUM_QUESTIONS = 10
62
  MODEL_KEYS = "-".join(SUBMISSIONS.keys())
63
  SUBMISSION_ORG = f"results-{MODEL_KEYS}"
 
202
  intro_view: gr.update(visible=True),
203
  result_view: gr.update(visible=True),
204
  gallery_view: gr.update(visible=False),
205
+ result: RESULT[favorite_model],
206
  }
207
  else:
208
  return {
 
213
  }
214
 
215
 
216
+ TITLE = "# What's Your AI Gen Personality 🧬?"
217
+
218
  DESCRIPTION = """
219
+ *In this interactive game you are shown image descriptions along side 4 AI generated images. Select the image that best fits the image description.
220
+ Answer **10** questions to find out what AI generator most resonates with you. If none of the images fit the prompt, choose the image that comes closest
221
+ in your opinion.* \n\n
222
  """
223
  EXPLANATION = """\n\n
224
+ ## What to do πŸ“– \n\n
225
 
226
  1. Click on 'Start'
227
  2. A prompt and 4 different images are displayed
228
  3. Select your favorite image
229
+ 4. After 10 rounds your favorite diffusion model is displayed \n\n
230
+
231
+ *The prompts you are shown originate from the [Parti Prompts](https://huggingface.co/datasets/nateraw/parti-prompts) dataset.
232
+ Parti Prompts is designed to test text-to-image AI models on 1600+ prompts of varying difficulty and categories.
233
+ The images you are shown have been pre-generated with 4 state-of-the-art open-sourced text-to-image models. \n\n
234
+ You answers will be used to contribute to the official [**Open Parti Prompts Leaderboard**](https://huggingface.co/spaces/OpenGenAI/parti-prompts-leaderboard). \n
235
+ By playing this game, you are greatly helping the community to have a better, **human-preference-aligned** metric to compare text-to-image models ❀️. \n\n
236
+ Every month, the generated images will be updated with possibly improved models.*
237
  """
238
 
239
  GALLERY_COLUMN_NUM = len(SUBMISSIONS)