mikaelbhai commited on
Commit
4b4dd6c
1 Parent(s): 6839708

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -25,6 +25,12 @@ def openai_create(prompt):
25
 
26
  return response.choices[0].text
27
 
 
 
 
 
 
 
28
 
29
 
30
  def chatgpt_clone(input, history):
 
25
 
26
  return response.choices[0].text
27
 
28
+ def send_message():
29
+ input_text = message.value
30
+ state["conversation_history"], _ = chatgpt_clone(input_text, state["conversation_history"])
31
+ message.value = "" # clear the input textbox after sending the message
32
+
33
+ submit = gr.Button("SEND", onclick=send_message)
34
 
35
 
36
  def chatgpt_clone(input, history):