Spaces:
Sleeping
Sleeping
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() |