Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,18 +16,7 @@ def generate_response(user_input):
|
|
| 16 |
else:
|
| 17 |
# Construct the prompt with the user input
|
| 18 |
prompt = f"You said: {user_input}"
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
def generate_response(user_input):
|
| 23 |
-
# Check if user input contains the phrase "who created you"
|
| 24 |
-
if "who is superstar" in user_input.lower():
|
| 25 |
-
# Generate a response that includes your name
|
| 26 |
-
chat_response = "Even kids will know who superstar is! The one and only * Superstar Rajinikanth *"
|
| 27 |
-
else:
|
| 28 |
-
# Construct the prompt with the user input
|
| 29 |
-
prompt = f"You said: {user_input}"
|
| 30 |
-
return prompt
|
| 31 |
|
| 32 |
# Generate a response using the OpenAI API
|
| 33 |
response = openai.Completion.create(
|
|
|
|
| 16 |
else:
|
| 17 |
# Construct the prompt with the user input
|
| 18 |
prompt = f"You said: {user_input}"
|
| 19 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
# Generate a response using the OpenAI API
|
| 22 |
response = openai.Completion.create(
|