import streamlit as st import openai from PIL import Image import os import streamlit_tags as stt api_key = os.environ['open_ai_api'] bot_role = os.environ['bot_role'] openai.api_key = api_key st.set_page_config( page_title="App by Adam", page_icon=":fork_and_knife:") messages = [ {"role": "system", "content": bot_role}, ] # List of suggested questions suggested_questions = [ "Three breakfast recipes", "Mcdonalds for lunch", "Cancer fighting foods", "Food and nutrition myths", "Pakistan dinner recipes", "I have a lot of belly fat", "Gas station food", "Grocery shopping list" ] def chatbot(input): if input: messages.append({"role": "user", "content": input}) chat = openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=messages ) reply = chat.choices[0].message.content messages.append({"role": "assistant", "content": reply}) return reply # Center the text and enlarge the font st.markdown("