Mahiruoshi commited on
Commit
3ae7c03
·
1 Parent(s): fc801ef

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -25
main.py CHANGED
@@ -218,29 +218,5 @@ class VitsGradio:
218
  app = Flask(__name__)
219
  print("开始部署")
220
  grVits = VitsGradio()
221
-
222
- @app.route('/chat')
223
- '''
224
- def text_api():
225
- message = request.args.get('Text','')
226
- audio,text = grVits.tts_fn(message)
227
- text = text.replace('[JA]','').replace('[ZH]','')
228
- with open('temp.wav','rb') as bit:
229
- wav_bytes = bit.read()
230
- headers = {
231
- 'Content-Type': 'audio/wav',
232
- 'Text': text.encode('utf-8')}
233
- return wav_bytes, 200, headers
234
- '''
235
- def gradio_interface():
236
- return grVits.Vits.launch()
237
-
238
  if __name__ == '__main__':
239
- '''
240
- api_thread = Thread(target=app.run, args=("0.0.0.0", 8080))
241
- '''
242
- gradio_thread = Thread(target=gradio_interface)
243
- '''
244
- api_thread.start()
245
- '''
246
- gradio_thread.start()
 
218
  app = Flask(__name__)
219
  print("开始部署")
220
  grVits = VitsGradio()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  if __name__ == '__main__':
222
+ grVits.Vits.launch()