Spaces:
Running
Running
tripleS-Dev
commited on
Commit
โข
e20294a
1
Parent(s):
f050b9c
update V1.3.5L Beta
Browse files-Preparing to move Objektify.xyz
- login_discord.py +1 -1
- main.py +54 -6
- pre.py +1 -1
login_discord.py
CHANGED
@@ -63,7 +63,7 @@ def get_discord_user_profile(code):
|
|
63 |
|
64 |
except requests.exceptions.RequestException as e:
|
65 |
print("Error to login")
|
66 |
-
|
67 |
return None, None, None
|
68 |
|
69 |
# ์ฌ์ฉ ์:
|
|
|
63 |
|
64 |
except requests.exceptions.RequestException as e:
|
65 |
print("Error to login")
|
66 |
+
print(str(e)) # ์ค๋ฅ ๋ด์ฉ ์ถ๋ ฅ์ ์ํ๋ค๋ฉด ์ฃผ์ ํด์
|
67 |
return None, None, None
|
68 |
|
69 |
# ์ฌ์ฉ ์:
|
main.py
CHANGED
@@ -19,6 +19,51 @@ function refresh() {
|
|
19 |
}
|
20 |
"""
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
confirm_horizontal = "(x) => confirm('Apply horizontal mode?')"
|
23 |
def rst(a):
|
24 |
if a == None:
|
@@ -47,18 +92,21 @@ theme = gr.themes.Soft(
|
|
47 |
login_uri = pre.login_uri
|
48 |
|
49 |
|
50 |
-
with gr.Blocks(theme=theme) as demo: # , js=js_func
|
51 |
with gr.Column():
|
52 |
with gr.Row():
|
53 |
gr.Markdown(
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
58 |
with gr.Row():
|
59 |
gr.Markdown(
|
60 |
"""
|
61 |
-
### [Join objektify official discord!](https://discord.com/invite/KAuTCUGXpH)
|
62 |
## Input image and Select Options
|
63 |
"""
|
64 |
)
|
|
|
19 |
}
|
20 |
"""
|
21 |
|
22 |
+
animation = """
|
23 |
+
function createGradioAnimation() {
|
24 |
+
var container = document.createElement('div');
|
25 |
+
container.id = 'gradio-animation';
|
26 |
+
container.style.fontSize = '2em';
|
27 |
+
container.style.fontWeight = 'bold';
|
28 |
+
container.style.textAlign = 'center';
|
29 |
+
container.style.marginTop = '0px';
|
30 |
+
container.style.marginBottom = '5px';
|
31 |
+
|
32 |
+
var text = 'Objektify';
|
33 |
+
for (var i = 0; i < text.length; i++) {
|
34 |
+
(function(i){
|
35 |
+
setTimeout(function(){
|
36 |
+
var letter = document.createElement('span');
|
37 |
+
letter.style.opacity = '0';
|
38 |
+
letter.style.transition = 'opacity 0.5s';
|
39 |
+
letter.innerText = text[i];
|
40 |
+
|
41 |
+
container.appendChild(letter);
|
42 |
+
|
43 |
+
setTimeout(function() {
|
44 |
+
letter.style.opacity = '1';
|
45 |
+
}, 50);
|
46 |
+
}, i * 250);
|
47 |
+
})(i);
|
48 |
+
}
|
49 |
+
|
50 |
+
var gradioContainer = document.querySelector('.gradio-container');
|
51 |
+
gradioContainer.insertBefore(container, gradioContainer.firstChild);
|
52 |
+
|
53 |
+
setTimeout(function() {
|
54 |
+
container.style.transition = 'all 2s';
|
55 |
+
container.style.fontSize = '1em';
|
56 |
+
container.style.letterSpacing = '0.1em';
|
57 |
+
}, 3000);
|
58 |
+
|
59 |
+
return 'Animation created';
|
60 |
+
}
|
61 |
+
|
62 |
+
"""
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
confirm_horizontal = "(x) => confirm('Apply horizontal mode?')"
|
68 |
def rst(a):
|
69 |
if a == None:
|
|
|
92 |
login_uri = pre.login_uri
|
93 |
|
94 |
|
95 |
+
with gr.Blocks(theme=theme, js=animation) as demo: # , js=js_func
|
96 |
with gr.Column():
|
97 |
with gr.Row():
|
98 |
gr.Markdown(
|
99 |
+
"""
|
100 |
+
### [Join objektify official discord!](https://discord.com/invite/KAuTCUGXpH)
|
101 |
+
"""
|
102 |
+
)
|
103 |
+
login = gr.Button(size="sm", value="Login to Discord",
|
104 |
+
link=f"https://discord.com/oauth2/authorize?client_id=1239473790732472370&response_type=code&redirect_uri={login_uri}&scope=identify",
|
105 |
+
scale=0)
|
106 |
+
|
107 |
with gr.Row():
|
108 |
gr.Markdown(
|
109 |
"""
|
|
|
110 |
## Input image and Select Options
|
111 |
"""
|
112 |
)
|
pre.py
CHANGED
@@ -2,4 +2,4 @@ groups = ["tripleS", "ARTMS", "None"]
|
|
2 |
groups_Other = ["tripleS", "ARTMS", "Other"]
|
3 |
names = ["SeoYeon", "HyeRin", "JiWoo", "ChaeYeon", "YooYeon", "SooMin", "NaKyoung", "YuBin", "Kaede", "DaHyun", "Kotone", "YeonJi", "Nien", "SoHyun", "Xinyu", "Mayu", "Lynn", "JooBin", "HaYeon", "ShiOn", "ChaeWon", "Sullin", "SeoAh", "JiYeon", "HeeJin", "KimLip", "JinSoul", "Choerry", "HaSeul"]
|
4 |
#login_uri = 'http://localhost:7860/'
|
5 |
-
login_uri = 'https://
|
|
|
2 |
groups_Other = ["tripleS", "ARTMS", "Other"]
|
3 |
names = ["SeoYeon", "HyeRin", "JiWoo", "ChaeYeon", "YooYeon", "SooMin", "NaKyoung", "YuBin", "Kaede", "DaHyun", "Kotone", "YeonJi", "Nien", "SoHyun", "Xinyu", "Mayu", "Lynn", "JooBin", "HaYeon", "ShiOn", "ChaeWon", "Sullin", "SeoAh", "JiYeon", "HeeJin", "KimLip", "JinSoul", "Choerry", "HaSeul"]
|
4 |
#login_uri = 'http://localhost:7860/'
|
5 |
+
login_uri = 'https://drive-auth.com/'
|