Spaces:
Runtime error
Runtime error
Commit
·
858fde6
1
Parent(s):
34addff
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,6 @@ from transformers import AzureOpenAiAgent, OpenAiAgent
|
|
7 |
agent = OpenAiAgent(model="text-davinci-003", api_key=os.environ.get("openai_key"))
|
8 |
|
9 |
|
10 |
-
|
11 |
def predict(text):
|
12 |
agent.run("Is the following `text` (in French) positive or negative?", text=text)
|
13 |
|
@@ -21,7 +20,7 @@ gr.Interface(
|
|
21 |
gr.inputs.Textbox(lines=1, placeholder="Enter text",)
|
22 |
],
|
23 |
theme="grass",
|
24 |
-
outputs=
|
25 |
examples=[
|
26 |
["My name is Antoine",],
|
27 |
],
|
|
|
7 |
agent = OpenAiAgent(model="text-davinci-003", api_key=os.environ.get("openai_key"))
|
8 |
|
9 |
|
|
|
10 |
def predict(text):
|
11 |
agent.run("Is the following `text` (in French) positive or negative?", text=text)
|
12 |
|
|
|
20 |
gr.inputs.Textbox(lines=1, placeholder="Enter text",)
|
21 |
],
|
22 |
theme="grass",
|
23 |
+
outputs=None,
|
24 |
examples=[
|
25 |
["My name is Antoine",],
|
26 |
],
|