Spaces:
Sleeping
Sleeping
Yunshansongbai
commited on
Commit
•
0ad5e8b
1
Parent(s):
c5f4ba2
Update app.py
Browse files
app.py
CHANGED
@@ -36,11 +36,15 @@ cache_model = {}
|
|
36 |
|
37 |
def callback(text):
|
38 |
if text == "reboot":
|
39 |
-
os._exit(0)
|
|
|
|
|
40 |
else:
|
41 |
global start_time
|
42 |
if time.time() - start_time >= 3600:
|
43 |
os._exit(0)
|
|
|
|
|
44 |
else:
|
45 |
return text
|
46 |
|
@@ -177,7 +181,7 @@ with app:
|
|
177 |
mixing_ratio = gr.Slider(0, 1, value=0.75,step=0.01,label="混音比例(人声:伴奏)", info="人声:伴奏")
|
178 |
btn_compose = gr.Button("混音", variant="primary")
|
179 |
text_output3 = gr.Textbox(label="输出信息")
|
180 |
-
song_output = gr.Audio(
|
181 |
|
182 |
with gr.TabItem("设置"):
|
183 |
start_time = time.time()
|
|
|
36 |
|
37 |
def callback(text):
|
38 |
if text == "reboot":
|
39 |
+
os._exit(0)
|
40 |
+
current_time = datetime.now()
|
41 |
+
one_hour_later = current_time + timedelta(hours=1)
|
42 |
else:
|
43 |
global start_time
|
44 |
if time.time() - start_time >= 3600:
|
45 |
os._exit(0)
|
46 |
+
current_time = datetime.now()
|
47 |
+
one_hour_later = current_time + timedelta(hours=1)
|
48 |
else:
|
49 |
return text
|
50 |
|
|
|
181 |
mixing_ratio = gr.Slider(0, 1, value=0.75,step=0.01,label="混音比例(人声:伴奏)", info="人声:伴奏")
|
182 |
btn_compose = gr.Button("混音", variant="primary")
|
183 |
text_output3 = gr.Textbox(label="输出信息")
|
184 |
+
song_output = gr.Audio("输出歌曲",variant="primary")
|
185 |
|
186 |
with gr.TabItem("设置"):
|
187 |
start_time = time.time()
|