File size: 1,122 Bytes
6e00735
 
 
 
 
afc6bfd
 
 
6e00735
 
 
 
 
afc6bfd
 
 
6e00735
 
afc6bfd
 
 
6e00735
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import gradio as gr
from transformers import pipeline

generator = pipeline("text-generation", model="gpt2")

def enhance_description(category, location, custom_name):
    prompt = f"Write a compelling Google Business Profile description for a business named '{custom_name}', which is a {category} based in {location}. Highlight quality, trust, and innovation."
    result = generator(prompt, max_length=120, num_return_sequences=1)[0]['generated_text']
    return result

iface = gr.Interface(
    fn=enhance_description,
    inputs=[
        gr.Textbox(label="Business Category", value="Website design services", placeholder="e.g. coffee shop"),
        gr.Textbox(label="Location", value="Colombia", placeholder="e.g. Medellín, Colombia"),
        gr.Textbox(label="Business Name", value="Webpy", placeholder="e.g. Webpy")
    ],
    outputs="text",
    title="GMB Description Optimizer - Powered by Webpy",
    description="Boost your Google My Business profile with an AI-generated description. Enter your business info and get an SEO-friendly, trustworthy summary in seconds.",
    theme="default"
)

iface.launch()