AUST001 commited on
Commit
02a3d49
·
1 Parent(s): fd7ab98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -27,10 +27,8 @@ def completion(prompt):
27
  return response.choices[0].text[2:]
28
 
29
  def greet(question):
30
- if question[-3:]=='???' or question[-3:]=='???':
31
- return completion('Please translate this passage into German and then into Chinese.\n'+question[:-3])
32
- else:
33
- return 'Unknown error'
34
 
35
  demo = gr.Interface(fn=greet, inputs=gr.Textbox(lines=20, placeholder='Please enter the text to be weighted down'), outputs=gr.Textbox(lines=20, placeholder='It will take some time to reduce the weight, please wait...'))
36
 
 
27
  return response.choices[0].text[2:]
28
 
29
  def greet(question):
30
+ return completion('Please translate this passage into German and then into Chinese.\n'+question)
31
+
 
 
32
 
33
  demo = gr.Interface(fn=greet, inputs=gr.Textbox(lines=20, placeholder='Please enter the text to be weighted down'), outputs=gr.Textbox(lines=20, placeholder='It will take some time to reduce the weight, please wait...'))
34