Spaces:
Runtime error
Runtime error
AmitPress
commited on
Commit
·
fd89b64
1
Parent(s):
b8596f1
correct error
Browse files
app.py
CHANGED
@@ -23,8 +23,8 @@ if photo:
|
|
23 |
genus, species = txt.split(' ')
|
24 |
venomousity = openai.Completion.create(engine="text-davinci-003", prompt=f"Is {genus} {species} is venomous? if venomous just say venomous otherwise say nonvenomous", max_tokens=50)
|
25 |
desc = openai.Completion.create(engine="text-davinci-003", prompt=f"Give a short description of {genus} {species}", max_tokens=500)
|
26 |
-
col1.write(venomousity)
|
27 |
-
col1.write(desc)
|
28 |
except:
|
29 |
col1.write(f"Error: There might be some network issue")
|
30 |
else:
|
|
|
23 |
genus, species = txt.split(' ')
|
24 |
venomousity = openai.Completion.create(engine="text-davinci-003", prompt=f"Is {genus} {species} is venomous? if venomous just say venomous otherwise say nonvenomous", max_tokens=50)
|
25 |
desc = openai.Completion.create(engine="text-davinci-003", prompt=f"Give a short description of {genus} {species}", max_tokens=500)
|
26 |
+
col1.write(venomousity.choices[0].text)
|
27 |
+
col1.write(desc.choices[0].text)
|
28 |
except:
|
29 |
col1.write(f"Error: There might be some network issue")
|
30 |
else:
|