import gradio as gr from transformers import pipeline # Load the model (change the model name if needed) model_name = "google/gemma-2b-it" generator = pipeline("text-generation", model=model_name) def generate_response(prompt): response = generator(prompt, max_length=200) return response[0]["generated_text"] iface = gr.Interface( fn=generate_response, inputs="text", outputs="text", title="Waste Reuse AI", description="This AI suggests reuse ideas for waste items." ) iface.launch()