yizhangliu commited on
Commit
d63db48
·
1 Parent(s): 0058b18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -3,6 +3,7 @@ import gradio as gr
3
  import sys
4
  import random
5
  import paddlehub as hub
 
6
 
7
  language_translation_model = hub.Module(directory=f'./baidu_translate')
8
  def getTextTrans(text, source='zh', target='en'):
@@ -34,6 +35,7 @@ for model_id in model_ids.keys():
34
  pass
35
 
36
  def infer(prompt):
 
37
  prompt = getTextTrans(prompt, source='zh', target='en') + f',{random.randint(0,sys.maxsize)}'
38
  return prompt
39
 
 
3
  import sys
4
  import random
5
  import paddlehub as hub
6
+ from loguru import logger
7
 
8
  language_translation_model = hub.Module(directory=f'./baidu_translate')
9
  def getTextTrans(text, source='zh', target='en'):
 
35
  pass
36
 
37
  def infer(prompt):
38
+ logger.info(f"infer_1_")
39
  prompt = getTextTrans(prompt, source='zh', target='en') + f',{random.randint(0,sys.maxsize)}'
40
  return prompt
41