Spaces:
Runtime error
Runtime error
fix the return statement to work with new openai API
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def get_completion(prompt, model=llm_model):
|
|
18 |
model=model,
|
19 |
temperature=0,
|
20 |
)
|
21 |
-
return response.choices[0].message
|
22 |
|
23 |
def find_orgs(sentence):
|
24 |
prompt = f"""
|
@@ -37,4 +37,4 @@ example = """
|
|
37 |
|
38 |
"""
|
39 |
iface = gr.Interface(fn=find_orgs, inputs="text", outputs="text", examples=[[example]])
|
40 |
-
iface.launch(share=
|
|
|
18 |
model=model,
|
19 |
temperature=0,
|
20 |
)
|
21 |
+
return response.choices[0].message.content
|
22 |
|
23 |
def find_orgs(sentence):
|
24 |
prompt = f"""
|
|
|
37 |
|
38 |
"""
|
39 |
iface = gr.Interface(fn=find_orgs, inputs="text", outputs="text", examples=[[example]])
|
40 |
+
iface.launch(share=False)
|