Spaces:
Runtime error
Runtime error
import gradio as gr | |
from transformers import pipeline | |
generator = pipeline("text-generation", model="gpt2") | |
def enhance_description(category, location): | |
prompt = f"Write a compelling Google Business Profile description for a {category} located in {location}." | |
result = generator(prompt, max_length=100, num_return_sequences=1)[0]['generated_text'] | |
return result | |
iface = gr.Interface( | |
fn=enhance_description, | |
inputs=[ | |
gr.Textbox(label="Business Category", placeholder="e.g. coffee shop"), | |
gr.Textbox(label="Location", placeholder="e.g. Medellín, Colombia") | |
], | |
outputs="text", | |
title="GMB Description Enhancer", | |
description="Generate a compelling business description for your Google My Business profile using AI.", | |
) | |
iface.launch() |