Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,9 +5,9 @@ from VitsModelSplit.vits_model_only_d import Vits_models_only_decoder
|
|
5 |
from VitsModelSplit.vits_model import VitsModel
|
6 |
import gradio as gr
|
7 |
import os
|
8 |
-
def create_file():
|
9 |
# مسار الملف المؤقت
|
10 |
-
file_path = "
|
11 |
|
12 |
# إنشاء ملف ONNX تجريبي في حالة عدم وجوده
|
13 |
if not os.path.exists(file_path):
|
@@ -153,8 +153,13 @@ class OnnxModelConverter:
|
|
153 |
|
154 |
btn=gr.Button("convert")
|
155 |
label=gr.Label("return name model onxx")
|
156 |
-
btn.click(self.convert,[text_n_model,text_n_token,text_n_onxx,choice],[
|
|
|
|
|
|
|
157 |
download_button = gr.File(create_file, label="Download ONNX File")
|
|
|
|
|
158 |
#choice.change(fn=function_change, inputs=choice, outputs=label)
|
159 |
return demo
|
160 |
c=OnnxModelConverter()
|
|
|
5 |
from VitsModelSplit.vits_model import VitsModel
|
6 |
import gradio as gr
|
7 |
import os
|
8 |
+
def create_file(file_path):
|
9 |
# مسار الملف المؤقت
|
10 |
+
#file_path = "DDFGDdd.onnx"
|
11 |
|
12 |
# إنشاء ملف ONNX تجريبي في حالة عدم وجوده
|
13 |
if not os.path.exists(file_path):
|
|
|
153 |
|
154 |
btn=gr.Button("convert")
|
155 |
label=gr.Label("return name model onxx")
|
156 |
+
btn.click(self.convert,[text_n_model,text_n_token,text_n_onxx,choice],[label])
|
157 |
+
btx=gr.Textbox("namefile")
|
158 |
+
|
159 |
+
download_button1=gr.Button("send")
|
160 |
download_button = gr.File(create_file, label="Download ONNX File")
|
161 |
+
download_button1.click(create_file,[btx],[download_button])
|
162 |
+
|
163 |
#choice.change(fn=function_change, inputs=choice, outputs=label)
|
164 |
return demo
|
165 |
c=OnnxModelConverter()
|