Spaces:
Running
Running
temptrip
commited on
Commit
Β·
e1c833d
1
Parent(s):
81ef2a4
init
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ def generate_trump_voice_with_realtime_updates(text, word_num, request: gr.Reque
|
|
| 21 |
IP_Dict[client_ip] = 0
|
| 22 |
IP_Dict[client_ip] += 1
|
| 23 |
print(f"client_ip: {client_ip}, count: {IP_Dict[client_ip]}")
|
| 24 |
-
if IP_Dict[client_ip]
|
| 25 |
msg = "You have reached the maximum number of requests"
|
| 26 |
# Create "Get More Tries" button HTML
|
| 27 |
get_more_tries_html = f"""
|
|
@@ -115,7 +115,7 @@ def generate_trump_voice_with_realtime_updates(text, word_num, request: gr.Reque
|
|
| 115 |
box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
|
| 116 |
transition: all 0.3s ease;
|
| 117 |
border: none;
|
| 118 |
-
'>π΅
|
| 119 |
</div>
|
| 120 |
"""
|
| 121 |
yield f"β
success!!!", local_audio_path, text_final, gr.update(value=action_buttons_html, visible=True), task_url
|
|
|
|
| 21 |
IP_Dict[client_ip] = 0
|
| 22 |
IP_Dict[client_ip] += 1
|
| 23 |
print(f"client_ip: {client_ip}, count: {IP_Dict[client_ip]}")
|
| 24 |
+
if IP_Dict[client_ip] >= 3:
|
| 25 |
msg = "You have reached the maximum number of requests"
|
| 26 |
# Create "Get More Tries" button HTML
|
| 27 |
get_more_tries_html = f"""
|
|
|
|
| 115 |
box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
|
| 116 |
transition: all 0.3s ease;
|
| 117 |
border: none;
|
| 118 |
+
'>π΅ Trump Writes & Sings for You (Free) </a>
|
| 119 |
</div>
|
| 120 |
"""
|
| 121 |
yield f"β
success!!!", local_audio_path, text_final, gr.update(value=action_buttons_html, visible=True), task_url
|