Spaces:
Sleeping
Sleeping
File size: 586 Bytes
006a6b4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import gradio as gr
from transformers import pipeline
# Load model
generator = pipeline("text2text-generation", model="flax-community/t5-recipe-generation")
# Function to generate recipes
def generate_recipe(ingredients):
result = generator(ingredients)
return result[0]["generated_text"]
# Gradio UI
iface = gr.Interface(
fn=generate_recipe,
inputs=gr.Textbox(placeholder="Enter ingredients..."),
outputs="text",
title="Chef Claude - AI Recipe Generator",
description="Enter ingredients, and Chef Claude will generate a recipe for you!"
)
iface.launch() |