pikto commited on
Commit
efa5b45
1 Parent(s): 851133b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -3,6 +3,11 @@ import gradio as gr
3
  import ast
4
  import requests
5
 
 
 
 
 
 
6
  API_URL_INITIAL = "https://ysharma-playground-ai-exploration.hf.space/run/initial_dataframe"
7
  API_URL_NEXT10 = "https://ysharma-playground-ai-exploration.hf.space/run/next_10_rows"
8
 
@@ -21,6 +26,16 @@ models = [
21
  {"name": "Tron Legacy Diffusion", "url": "dallinmackay/Tron-Legacy-diffusion"},
22
  ]
23
 
 
 
 
 
 
 
 
 
 
 
24
  text_gen = gr.Interface.load("spaces/daspartho/prompt-extend")
25
 
26
  current_model = models[0]
 
3
  import ast
4
  import requests
5
 
6
+ import logging
7
+ from rembg import new_session
8
+ from cutter import remove, make_label
9
+ from utils import *
10
+
11
  API_URL_INITIAL = "https://ysharma-playground-ai-exploration.hf.space/run/initial_dataframe"
12
  API_URL_NEXT10 = "https://ysharma-playground-ai-exploration.hf.space/run/next_10_rows"
13
 
 
26
  {"name": "Tron Legacy Diffusion", "url": "dallinmackay/Tron-Legacy-diffusion"},
27
  ]
28
 
29
+
30
+ #### REM-BG
31
+ remove_bg_models = {
32
+ "TracerUniversalB7": "TracerUniversalB7",
33
+ "U2NET": "u2net",
34
+ "U2NET Human Seg": "u2net_human_seg",
35
+ "U2NET Cloth Seg": "u2net_cloth_seg"
36
+ }
37
+ ###########
38
+
39
  text_gen = gr.Interface.load("spaces/daspartho/prompt-extend")
40
 
41
  current_model = models[0]