chatbot / app.py
Evan Lesmez
Vegan recipe chatbot app demo rdy
6e5b58a
raw
history blame
551 Bytes
from lv_recipe_chatbot.app import create_demo, SYSTEM_PROMPT, OpenAI, VEGAN_RECIPE_SEARCH_TOOL_SCHEMA
import os
# for Hugging Face
if __name__ == "__main__":
client = OpenAI()
assistant = client.beta.assistants.create(
name="Vegan Recipe Finder",
instructions=SYSTEM_PROMPT,
model="gpt-4o",
tools=[VEGAN_RECIPE_SEARCH_TOOL_SCHEMA],
)
demo = create_demo(client,assistant)
# demo.launch()
demo.launch(
auth=(os.environ["GRADIO_DEMO_USERNAME"], os.environ["GRADIO_DEMO_PASSWORD"])
)