Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
hhz520
/
webchat
like
0
Configuration error
App
Files
Files
Community
main
webchat
/
translate
/
factory.py
hhz520
Upload 170 files
61517de
8 months ago
raw
Copy download link
history
blame
contribute
delete
No virus
190 Bytes
def
create_translator
(
voice_type
):
if
voice_type ==
"baidu"
:
from
translate.baidu.baidu_translate
import
BaiduTranslator
return
BaiduTranslator()
raise
RuntimeError