prithivMLmods commited on
Commit
000d66d
·
verified ·
1 Parent(s): 5ff6252

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -39
app.py CHANGED
@@ -24,24 +24,6 @@ from transformers import (
24
  from transformers.image_utils import load_image
25
  from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
26
 
27
- DESCRIPTION = """
28
- # Gen Vision 🎃
29
- """
30
-
31
- css = '''
32
- h1 {
33
- text-align: center;
34
- display: block;
35
- }
36
-
37
- #duplicate-button {
38
- margin: auto;
39
- color: #fff;
40
- background: #1565c0;
41
- border-radius: 100vh;
42
- }
43
- '''
44
-
45
  MAX_MAX_NEW_TOKENS = 2048
46
  DEFAULT_MAX_NEW_TOKENS = 1024
47
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
@@ -335,31 +317,30 @@ demo = gr.ChatInterface(
335
  gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2),
336
  ],
337
  examples=[
338
- ['@realism Chocolate dripping from a donut against a yellow background, in the style of brocore, hyper-realistic'],
339
- ["@pixar A young man with light brown wavy hair and light brown eyes sitting in an armchair and looking directly at the camera, pixar style, disney pixar, office background, ultra detailed, 1 man"],
340
- ["@realism A futuristic cityscape with neon lights"],
341
- ["@photoshoot A portrait of a person with dramatic lighting"],
342
- [{"text": "summarize the letter", "files": ["examples/1.png"]}],
343
- ["Python Program for Array Rotation"],
344
- ["@tts1 Who is Nikola Tesla, and why did he die?"],
345
- ["@clothing Fashionable streetwear in an urban environment"],
346
- ["@interior A modern living room interior with minimalist design"],
347
- ["@fashion A runway model in haute couture"],
348
- ["@minimalistic A simple and elegant design of a serene landscape"],
349
- ["@modern A contemporary art piece with abstract geometric shapes"],
350
- ["@animaliea A cute animal portrait with vibrant colors"],
351
- ["@wallpaper A scenic mountain range perfect for a desktop wallpaper"],
352
- ["@cars A sleek sports car cruising on a city street"],
353
- ["@pencilart A detailed pencil sketch of a historic building"],
354
- ["@artminimalistic An artistic minimalist composition with subtle tones"],
355
- ["@tts2 What causes rainbows to form?"],
356
  ],
357
  cache_examples=False,
358
  type="messages",
359
- description=DESCRIPTION,
360
- css=css,
361
  fill_height=True,
362
- textbox=gr.MultimodalTextbox(label="Query Input", file_types=["image"], file_count="multiple", placeholder="default [text, vision] , scroll down examples to explore more art styles"),
363
  stop_btn="Stop Generation",
364
  multimodal=True,
365
  )
 
24
  from transformers.image_utils import load_image
25
  from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  MAX_MAX_NEW_TOKENS = 2048
28
  DEFAULT_MAX_NEW_TOKENS = 1024
29
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
 
317
  gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2),
318
  ],
319
  examples=[
320
+ ["@realism Chocolate dripping from a donut, hyper-realistic"],
321
+ ["@pixar Young man with wavy hair in an armchair, Pixar style"],
322
+ ["@realism Futuristic cityscape with neon lights"],
323
+ ["Write the python array rotation program"],
324
+ ["@photoshoot Dramatic portrait lighting"],
325
+ [{"text": "Summarize the letter", "files": ["examples/1.png"]}],
326
+ ["@tts1 Who was Nikola Tesla and how did he die?"],
327
+ ["@clothing Fashionable streetwear in the city"],
328
+ ["@interior Modern minimalist living room"],
329
+ ["@fashion Runway model in haute couture"],
330
+ ["@minimalistic Elegant serene landscape"],
331
+ ["@modern Abstract geometric art"],
332
+ ["@animaliea Cute animal portrait, vibrant colors"],
333
+ ["@wallpaper Scenic mountain desktop wallpaper"],
334
+ ["@cars Sleek sports car on city streets"],
335
+ ["@pencilart Detailed historic building sketch"],
336
+ ["@artminimalistic Subtle minimalist artwork"],
337
+ ["@tts2 What causes rainbows?"],
338
  ],
339
  cache_examples=False,
340
  type="messages",
341
+ description="# **Gen Vision** `tts: @tts1 @tts2` \n `image-tags: @realism, @pixar, @photoshoot, @clothing, @interior, @fashion, @minimalistic, @modern, @animaliea, @wallpaper, @cars, @pencilart, @artminimalistic` \n `default: chat, image inference`",
 
342
  fill_height=True,
343
+ textbox=gr.MultimodalTextbox(label="Query Input", file_types=["image"], file_count="multiple", placeholder="text, image-infer, image-generation, tts"),
344
  stop_btn="Stop Generation",
345
  multimodal=True,
346
  )