Spaces:
Runtime error
Runtime error
File size: 786 Bytes
6e00735 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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() |