Spaces:
Runtime error
Runtime error
Delete App.py
Browse files
App.py
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
from transformers import pipeline
|
3 |
-
|
4 |
-
generator = pipeline("text-generation", model="gpt2")
|
5 |
-
|
6 |
-
def enhance_description(category, location):
|
7 |
-
prompt = f"Write a compelling Google Business Profile description for a {category} located in {location}."
|
8 |
-
result = generator(prompt, max_length=100, num_return_sequences=1)[0]['generated_text']
|
9 |
-
return result
|
10 |
-
|
11 |
-
iface = gr.Interface(
|
12 |
-
fn=enhance_description,
|
13 |
-
inputs=[
|
14 |
-
gr.Textbox(label="Business Category", placeholder="e.g. coffee shop"),
|
15 |
-
gr.Textbox(label="Location", placeholder="e.g. Medellín, Colombia")
|
16 |
-
],
|
17 |
-
outputs="text",
|
18 |
-
title="GMB Description Enhancer",
|
19 |
-
description="Generate a compelling business description for your Google My Business profile using AI.",
|
20 |
-
)
|
21 |
-
|
22 |
-
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|