DmitrMakeev
commited on
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
|
3 |
+
import os
|
4 |
+
|
5 |
+
import gradio as gr
|
6 |
+
import torch
|
7 |
+
|
8 |
+
from app_base import create_demo as create_demo_base
|
9 |
+
from app_sketch import create_demo as create_demo_sketch
|
10 |
+
from model import ADAPTER_NAMES, Model, download_all_adapters
|
11 |
+
|
12 |
+
DESCRIPTION = "# MANDALAS - EG"
|
13 |
+
|
14 |
+
download_all_adapters()
|
15 |
+
model = Model(ADAPTER_NAMES[0])
|
16 |
+
|
17 |
+
with gr.Blocks(css="style.css") as demo:
|
18 |
+
gr.Markdown(DESCRIPTION)
|
19 |
+
with gr.Tabs():
|
20 |
+
with gr.Tab(label="Base"):
|
21 |
+
create_demo_base(model)
|
22 |
+
with gr.Tab(label="Sketch"):
|
23 |
+
create_demo_sketch(model)
|
24 |
+
|
25 |
+
if __name__ == "__main__":
|
26 |
+
demo.queue(max_size=20).launch(share=True)
|