ajayx2006 commited on
Commit
29e0337
·
verified ·
1 Parent(s): a39bacb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -17,7 +17,7 @@ make the budget in Indian ruppes."""
17
  conversation_history = []
18
 
19
  # Define a function to handle user messages
20
- def handle_message(user_message):
21
  # Add the user's message to the conversation history
22
  conversation_history.append({"role": "user", "content": user_message})
23
 
@@ -40,7 +40,7 @@ def handle_message(user_message):
40
  return chat_completion.choices[0].message.content
41
 
42
  # Create a Gradio interface with a chatbot component
43
- iface = gr.Interface(fn=handle_message, inputs="text", outputs="text", title="Quantum Marketing AI")
44
 
45
  # Launch the interface
46
- iface.launch(share=True)
 
17
  conversation_history = []
18
 
19
  # Define a function to handle user messages
20
+ def handle_message(user_message,iface):
21
  # Add the user's message to the conversation history
22
  conversation_history.append({"role": "user", "content": user_message})
23
 
 
40
  return chat_completion.choices[0].message.content
41
 
42
  # Create a Gradio interface with a chatbot component
43
+ iface = gr.ChatInterface(handle_message)
44
 
45
  # Launch the interface
46
+ iface.launch(share=True)