Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,10 +27,8 @@ def completion(prompt):
|
|
| 27 |
return response.choices[0].text[2:]
|
| 28 |
|
| 29 |
def greet(question):
|
| 30 |
-
|
| 31 |
-
|
| 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 |
|