tombetthauser commited on
Commit
e62a9a3
Β·
1 Parent(s): 31d1fbe

Attempt to redeploy without artbot tab

Browse files
Files changed (1) hide show
  1. app.py +27 -25
app.py CHANGED
@@ -409,37 +409,37 @@ with gr.Blocks() as beta:
409
 
410
  # ----- Artbot Tab -----------------------------------------------------------------
411
 
412
- import random
413
 
414
- with gr.Blocks(css=".gradio-container {max-width: 650px}") as artbot_1:
415
- gr.Markdown('''
416
- # <span style="display: inline-block; height: 30px; width: 30px; margin-bottom: -3px; border-radius: 7px; background-size: 50px; background-position: center; background-image: url(http://www.astronaut.horse/thumbnail.jpg)"></span> Astronaut Horse
417
 
418
- These images are generated in real time by a generative machine learning model fine-tuned on input artworks chosen by collaborating visual artists. The hardware resources to run this process have been generously provided at no cost by Hugging Face via a Community GPU Grant. For full control over all input parameters see the other tabs on this application. For more images and information on the project see the main project page or the discord community linked below. The images you generate here are not recorded unless you save them, they belong to everyone and no one.
419
- <br><br>
420
- <a href="http://www.astronaut.horse">http://www.astronaut.horse</a>
421
- <br>
422
- <a href="https://discord.gg/ZctfW4SvGw">https://discord.com</a><br>
423
- ''')
424
 
425
- # with gr.Row():
426
- # dropdown = gr.Dropdown([dropdown for dropdown in list(DROPDOWNS) if 'ahx-model' in dropdown], label="choose style...")
427
- # size_dropdown = gr.Dropdown(['square', 'portrait', 'landscape'], label="choose size...")
428
- # prompt = gr.Textbox(label="image prompt...", elem_id="input-text")
429
 
430
- all_models = [dropdown for dropdown in list(DROPDOWNS) if 'ahx-' in dropdown]
431
- model_1 = random.choice(all_models)
432
- model_2 = random.choice(all_models)
433
 
434
- prompt = f"{model_1} {model_2}"
435
 
436
- seed = random_seed()
437
 
438
- go_button = gr.Button("generate image", elem_id="go-button")
439
- output = gr.Image(elem_id="output-image")
440
- output_text = gr.Text(elem_id="output-text")
441
- # go_button.click(fn=simple_image_prompt, inputs=[prompt, dropdown, size_dropdown], outputs=[output, output_text])
442
- go_button.click(fn=image_prompt, inputs=[prompt, 7.5, 30, seed, 768, 768, ""], outputs=[output, output_text])
443
 
444
 
445
 
@@ -859,6 +859,8 @@ with gr.Blocks() as depth_controlnet_gradio:
859
 
860
  # ----- Launch Tabs -----------------------------------------------------------------
861
 
862
- tabbed_interface = gr.TabbedInterface([artbot_1, new_welcome, advanced_tab, beta, canny_blocks_interface, depth_controlnet_gradio], ["ArtBot", "Models", "Advanced", "Beta", "EdgeTrace", "DepthMap"])
 
 
863
  # tabbed_interface = gr.TabbedInterface([new_welcome, advanced_tab, beta], ["Artbots", "Advanced", "Beta"])
864
  tabbed_interface.launch()
 
409
 
410
  # ----- Artbot Tab -----------------------------------------------------------------
411
 
412
+ # import random
413
 
414
+ # with gr.Blocks(css=".gradio-container {max-width: 650px}") as artbot_1:
415
+ # gr.Markdown('''
416
+ # # <span style="display: inline-block; height: 30px; width: 30px; margin-bottom: -3px; border-radius: 7px; background-size: 50px; background-position: center; background-image: url(http://www.astronaut.horse/thumbnail.jpg)"></span> Astronaut Horse
417
 
418
+ # These images are generated in real time by a generative machine learning model fine-tuned on input artworks chosen by collaborating visual artists. The hardware resources to run this process have been generously provided at no cost by Hugging Face via a Community GPU Grant. For full control over all input parameters see the other tabs on this application. For more images and information on the project see the main project page or the discord community linked below. The images you generate here are not recorded unless you save them, they belong to everyone and no one.
419
+ # <br><br>
420
+ # <a href="http://www.astronaut.horse">http://www.astronaut.horse</a>
421
+ # <br>
422
+ # <a href="https://discord.gg/ZctfW4SvGw">https://discord.com</a><br>
423
+ # ''')
424
 
425
+ # # with gr.Row():
426
+ # # dropdown = gr.Dropdown([dropdown for dropdown in list(DROPDOWNS) if 'ahx-model' in dropdown], label="choose style...")
427
+ # # size_dropdown = gr.Dropdown(['square', 'portrait', 'landscape'], label="choose size...")
428
+ # # prompt = gr.Textbox(label="image prompt...", elem_id="input-text")
429
 
430
+ # all_models = [dropdown for dropdown in list(DROPDOWNS) if 'ahx-' in dropdown]
431
+ # model_1 = random.choice(all_models)
432
+ # model_2 = random.choice(all_models)
433
 
434
+ # prompt = f"{model_1} {model_2}"
435
 
436
+ # seed = random_seed()
437
 
438
+ # go_button = gr.Button("generate image", elem_id="go-button")
439
+ # output = gr.Image(elem_id="output-image")
440
+ # output_text = gr.Text(elem_id="output-text")
441
+ # # go_button.click(fn=simple_image_prompt, inputs=[prompt, dropdown, size_dropdown], outputs=[output, output_text])
442
+ # go_button.click(fn=image_prompt, inputs=[prompt, 7.5, 30, seed, 768, 768, ""], outputs=[output, output_text])
443
 
444
 
445
 
 
859
 
860
  # ----- Launch Tabs -----------------------------------------------------------------
861
 
862
+ tabbed_interface = gr.TabbedInterface([new_welcome, advanced_tab, beta, canny_blocks_interface, depth_controlnet_gradio], ["Models", "Advanced", "Beta", "EdgeTrace", "DepthMap"])
863
+ # tabbed_interface = gr.TabbedInterface([artbot_1, new_welcome, advanced_tab, beta, canny_blocks_interface, depth_controlnet_gradio], ["ArtBot", "Models", "Advanced", "Beta", "EdgeTrace", "DepthMap"])
864
+
865
  # tabbed_interface = gr.TabbedInterface([new_welcome, advanced_tab, beta], ["Artbots", "Advanced", "Beta"])
866
  tabbed_interface.launch()