Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,6 +19,7 @@ def generate_response(user_input):
|
|
| 19 |
else:
|
| 20 |
prompt = f"You said: {user_input}"
|
| 21 |
|
|
|
|
| 22 |
# Generate a response using the OpenAI API
|
| 23 |
response = openai.Completion.create(
|
| 24 |
model="text-davinci-003",
|
|
@@ -55,8 +56,8 @@ conversation_prompt = "Welcome to ChatRobo, kindly type in your enquiries: "
|
|
| 55 |
# Set up the Gradio interface
|
| 56 |
block = gr.Interface(
|
| 57 |
fn=openai_chat_history,
|
| 58 |
-
inputs=[gr.inputs.Textbox(placeholder=conversation_prompt), gr.inputs.
|
| 59 |
-
outputs=[gr.outputs.Textbox(label="ChatRobo Output")
|
| 60 |
)
|
| 61 |
|
| 62 |
# Launch the Gradio interface
|
|
|
|
| 19 |
else:
|
| 20 |
prompt = f"You said: {user_input}"
|
| 21 |
|
| 22 |
+
|
| 23 |
# Generate a response using the OpenAI API
|
| 24 |
response = openai.Completion.create(
|
| 25 |
model="text-davinci-003",
|
|
|
|
| 56 |
# Set up the Gradio interface
|
| 57 |
block = gr.Interface(
|
| 58 |
fn=openai_chat_history,
|
| 59 |
+
inputs=[gr.inputs.Textbox(placeholder=conversation_prompt), gr.inputs.Textbox(readonly=True, label="Chat History")],
|
| 60 |
+
outputs=[gr.outputs.Textbox(label="ChatRobo Output")]
|
| 61 |
)
|
| 62 |
|
| 63 |
# Launch the Gradio interface
|