File size: 551 Bytes
6e5b58a
986fa13
33d21bf
986fa13
adaea7c
 
 
6e5b58a
 
 
 
 
 
33d21bf
6e5b58a
 
33d21bf
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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"])
    )