Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,16 +1,17 @@
|
|
1 |
#!/usr/bin/env python
|
2 |
# coding: utf-8
|
3 |
|
4 |
-
# In[ ]:
|
5 |
-
|
6 |
-
|
7 |
import os
|
8 |
import openai
|
9 |
import gradio as gr
|
10 |
|
11 |
openai.api_key = os.getenv('openaikey')
|
12 |
|
13 |
-
def predict(input,
|
|
|
|
|
|
|
|
|
14 |
response = openai.Completion.create(
|
15 |
model="text-davinci-003",
|
16 |
prompt=input,
|
|
|
1 |
#!/usr/bin/env python
|
2 |
# coding: utf-8
|
3 |
|
|
|
|
|
|
|
4 |
import os
|
5 |
import openai
|
6 |
import gradio as gr
|
7 |
|
8 |
openai.api_key = os.getenv('openaikey')
|
9 |
|
10 |
+
def predict(input, manual_query_repacement, history=[]):
|
11 |
+
|
12 |
+
if manual_query_repacement != "":
|
13 |
+
input = manual_query_repacement
|
14 |
+
|
15 |
response = openai.Completion.create(
|
16 |
model="text-davinci-003",
|
17 |
prompt=input,
|