Spaces:
Paused
Paused
Rename app (2).py to app.py
Browse files- app (2).py β app.py +3 -15
app (2).py β app.py
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
#Script added by SPDraptor
|
2 |
import spaces
|
3 |
from typing import Optional
|
4 |
-
import subprocess
|
5 |
-
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
6 |
import torch
|
7 |
print("cuda present = ",torch.cuda.is_available())
|
8 |
import os
|
@@ -10,9 +10,7 @@ import sys
|
|
10 |
import gradio as gr
|
11 |
from PIL import Image
|
12 |
|
13 |
-
|
14 |
-
from modules import controlnetSD
|
15 |
-
# import modules.inpaint.utils_inpaint
|
16 |
|
17 |
|
18 |
|
@@ -28,16 +26,6 @@ css = """
|
|
28 |
|
29 |
with gr.Blocks(css=css) as demo:
|
30 |
gr.Markdown(DESCRIPTION)
|
31 |
-
with gr.Tab(label="OBJ_mask"):
|
32 |
-
with gr.Row():
|
33 |
-
with gr.Column():
|
34 |
-
image = gr.Image(label="Input main Picture")
|
35 |
-
image_object = gr.Textbox(label="object name")
|
36 |
-
mask_btn = gr.Button(value="createMask")
|
37 |
-
|
38 |
-
with gr.Column():
|
39 |
-
output_mask = gr.Image(label="mask")
|
40 |
-
mask_btn.click(masking_module.masking_process,inputs=[image,image_object],outputs=output_mask,api_name="masking_step")
|
41 |
with gr.Tab(label="img_inpaint"):
|
42 |
with gr.Row():
|
43 |
with gr.Column():
|
|
|
1 |
#Script added by SPDraptor
|
2 |
import spaces
|
3 |
from typing import Optional
|
4 |
+
# import subprocess
|
5 |
+
# subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
6 |
import torch
|
7 |
print("cuda present = ",torch.cuda.is_available())
|
8 |
import os
|
|
|
10 |
import gradio as gr
|
11 |
from PIL import Image
|
12 |
|
13 |
+
import controlnetSD
|
|
|
|
|
14 |
|
15 |
|
16 |
|
|
|
26 |
|
27 |
with gr.Blocks(css=css) as demo:
|
28 |
gr.Markdown(DESCRIPTION)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
with gr.Tab(label="img_inpaint"):
|
30 |
with gr.Row():
|
31 |
with gr.Column():
|