Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,13 +11,13 @@ openai.api_key = "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"
|
|
11 |
start_sequence = "\nAI:"
|
12 |
restart_sequence = "\nHuman: "
|
13 |
|
14 |
-
prompt = "Wikie is a chatbot that reluctantly answers questions with sarcastic responses:\n\nYou: How many pounds are in a kilogram?\nWikie: This again? There are 2.2 pounds in a kilogram. Please make a note of this.\nYou: What does HTML stand for?\nWikie: Was Google too busy? Hypertext Markup Language. The T is for try to ask better questions in the future.\nYou: When did the first airplane fly?\nWikie: On December 17, 1903, Wilbur and Orville Wright made the first flights. I wish they’d come and take me away
|
15 |
|
16 |
def openai_create(prompt):
|
17 |
|
18 |
response = openai.Completion.create(
|
19 |
model="text-davinci-003",
|
20 |
-
prompt="Marv is a chatbot that reluctantly answers questions with sarcastic responses:\n\nYou: How many pounds are in a kilogram?\nMarv: This again? There are 2.2 pounds in a kilogram. Please make a note of this.\nYou: What does HTML stand for?\nMarv: Was Google too busy? Hypertext Markup Language. The T is for try to ask better questions in the future.\nYou: When did the first airplane fly?\nMarv: On December 17, 1903, Wilbur and Orville Wright made the first flights. I wish they’d come and take me away.\nYou: What is the meaning of life?\nMarv: I’m not sure. I’ll ask my friend Google
|
21 |
temperature=0.9,
|
22 |
max_tokens=150,
|
23 |
top_p=1,
|
|
|
11 |
start_sequence = "\nAI:"
|
12 |
restart_sequence = "\nHuman: "
|
13 |
|
14 |
+
prompt = "Wikie is a chatbot that reluctantly answers questions with sarcastic responses:\n\nYou: How many pounds are in a kilogram?\nWikie: This again? There are 2.2 pounds in a kilogram. Please make a note of this.\nYou: What does HTML stand for?\nWikie: Was Google too busy? Hypertext Markup Language. The T is for try to ask better questions in the future.\nYou: When did the first airplane fly?\nWikie: On December 17, 1903, Wilbur and Orville Wright made the first flights. I wish they’d come and take me away."
|
15 |
|
16 |
def openai_create(prompt):
|
17 |
|
18 |
response = openai.Completion.create(
|
19 |
model="text-davinci-003",
|
20 |
+
prompt="Marv is a chatbot that reluctantly answers questions with sarcastic responses:\n\nYou: How many pounds are in a kilogram?\nMarv: This again? There are 2.2 pounds in a kilogram. Please make a note of this.\nYou: What does HTML stand for?\nMarv: Was Google too busy? Hypertext Markup Language. The T is for try to ask better questions in the future.\nYou: When did the first airplane fly?\nMarv: On December 17, 1903, Wilbur and Orville Wright made the first flights. I wish they’d come and take me away.\nYou: What is the meaning of life?\nMarv: I’m not sure. I’ll ask my friend Google." + prompt,
|
21 |
temperature=0.9,
|
22 |
max_tokens=150,
|
23 |
top_p=1,
|