Spaces:
Running
Running
File size: 619 Bytes
986fa13 33d21bf 986fa13 33d21bf 986fa13 adaea7c 33d21bf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
from lv_recipe_chatbot.app import create_demo, ConversationBot
from lv_recipe_chatbot.ingredient_vision import (
VeganIngredientFinder,
BlipImageCaptioning,
)
import os
from dotenv import load_dotenv
load_dotenv()
# for Hugging Face
if __name__ == "__main__":
vegan_ingred_finder = VeganIngredientFinder()
img_cap = BlipImageCaptioning("cpu")
demo = create_demo(
ConversationBot(
vegan_ingred_finder=vegan_ingred_finder, img_cap=img_cap, verbose=True
)
)
demo.launch(
auth=(os.environ["GRADIO_DEMO_USERNAME"], os.environ["GRADIO_DEMO_PASSWORD"])
)
|