Spaces:
Runtime error
Runtime error
File size: 2,136 Bytes
05fd390 5a2793f 4efa9a6 e384b8f a267f7a 05fd390 9db9711 034d231 05fd390 8e4a774 05fd390 3775564 b0a2e4f 6debf2b b0a2e4f 3775564 b0a2e4f 3775564 9db9711 8e4a774 b0a2e4f 05fd390 8e4a774 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
import gradio as gr
import torch
import os
import shutil
import requests
import subprocess
from subprocess import getoutput
from huggingface_hub import login, HfFileSystem, snapshot_download, HfApi, create_repo
from app_train import create_training_demo
from sdxl.app_inference import create_inference_demo
css="""
#col-container {max-width: 780px; margin-left: auto; margin-right: auto;}
#upl-dataset-group {background-color: none!important;}
div#warning-ready {
background-color: #ecfdf5;
padding: 0 10px 5px;
margin: 20px 0;
}
div#warning-ready > .gr-prose > h2, div#warning-ready > .gr-prose > p {
color: #057857!important;
}
div#warning-duplicate {
background-color: #ebf5ff;
padding: 0 10px 5px;
margin: 20px 0;
}
div#warning-duplicate > .gr-prose > h2, div#warning-duplicate > .gr-prose > p {
color: #0f4592!important;
}
div#warning-duplicate strong {
color: #0f4592;
}
p.actions {
display: flex;
align-items: center;
margin: 20px 0;
}
div#warning-duplicate .actions a {
display: inline-block;
margin-right: 10px;
}
div#warning-setgpu {
background-color: #fff4eb;
padding: 0 10px 5px;
margin: 20px 0;
}
div#warning-setgpu > .gr-prose > h2, div#warning-setgpu > .gr-prose > p {
color: #92220f!important;
}
div#warning-setgpu a, div#warning-setgpu b {
color: #91230f;
}
div#warning-setgpu p.actions > a {
display: inline-block;
background: #1f1f23;
border-radius: 40px;
padding: 6px 24px;
color: antiquewhite;
text-decoration: none;
font-weight: 600;
font-size: 1.2em;
}
button#load-dataset-btn{
min-height: 60px;
}
"""
with gr.Blocks(css=css) as demo:
gr.Markdown("SUTD x SUNS Shop Design Generator")
with gr.Tab("Training"):
create_training_demo()
with gr.Tab("Generation"):
create_inference_demo()
with gr.Tab("Visualisation"):
gr.Markdown('''
- You can use this tab to upload models later if you choose not to upload models in training time or if upload in training time failed.
''')
demo.queue(max_size=1).launch(debug=True, share=True) |