jorge-armando-navarro-flores commited on
Commit
3c5152d
1 Parent(s): 06c1eaa
Files changed (2) hide show
  1. app.py +3 -2
  2. email_sender.py +0 -1
app.py CHANGED
@@ -14,7 +14,8 @@ with gr.Blocks() as demo:
14
  appTitle = gr.Label("GPT Order Bot", color="#6EACDA")
15
  with gr.Row():
16
  with gr.Column(scale=1):
17
- apikey = gr.Textbox(label="Open AI API key", placeholder="Input your OpenAI API key", type="password")
 
18
  model = gr.Dropdown(label="Model", value="gpt-3.5-turbo", choices=["gpt-3.5-turbo", "gpt-4-turbo", "gpt-4o"])
19
  context = gr.Dropdown(label="Store type", value=store_types[0], choices=store_types)
20
  label = gr.Label("Set your Order Bot")
@@ -25,7 +26,7 @@ with gr.Blocks() as demo:
25
 
26
  with gr.Column(scale=3):
27
  chatbot = gr.Chatbot(pizza_shop_context, type="messages")
28
- msg = gr.Textbox()
29
  clear = gr.ClearButton([msg, chatbot])
30
 
31
  def respond(message, chat_history):
 
14
  appTitle = gr.Label("GPT Order Bot", color="#6EACDA")
15
  with gr.Row():
16
  with gr.Column(scale=1):
17
+ apikey = gr.Textbox(label="OpenAI API key", placeholder="Input your OpenAI API key", type="password")
18
+ gr.Markdown("Get your OpenAI API key [here](https://platform.openai.com/api-keys) you will need to create an OpeanAI account if you don't have")
19
  model = gr.Dropdown(label="Model", value="gpt-3.5-turbo", choices=["gpt-3.5-turbo", "gpt-4-turbo", "gpt-4o"])
20
  context = gr.Dropdown(label="Store type", value=store_types[0], choices=store_types)
21
  label = gr.Label("Set your Order Bot")
 
26
 
27
  with gr.Column(scale=3):
28
  chatbot = gr.Chatbot(pizza_shop_context, type="messages")
29
+ msg = gr.Textbox(label="Press Enter to submit your meassage")
30
  clear = gr.ClearButton([msg, chatbot])
31
 
32
  def respond(message, chat_history):
email_sender.py CHANGED
@@ -43,7 +43,6 @@ def send_email(content, receiver_email, apikey):
43
  # Send the email using the 'with' statement
44
  try:
45
  if not receiver_email: raise ValueError
46
- print(smtp_server, smtp_port, sender_email)
47
  with smtplib.SMTP_SSL(smtp_server, smtp_port) as server:
48
  server.login(sender_email, password)
49
  server.send_message(message)
 
43
  # Send the email using the 'with' statement
44
  try:
45
  if not receiver_email: raise ValueError
 
46
  with smtplib.SMTP_SSL(smtp_server, smtp_port) as server:
47
  server.login(sender_email, password)
48
  server.send_message(message)