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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import re
|
| 3 |
+
import random
|
| 4 |
+
import json
|
| 5 |
+
from dotenv import load_dotenv
|
| 6 |
+
import os
|
| 7 |
+
from openai import OpenAI
|
| 8 |
+
import tiktoken
|
| 9 |
+
|
| 10 |
+
# 🔐 Load API Key from .env
|
| 11 |
+
load_dotenv()
|
| 12 |
+
api_key = os.getenv("OPENAI_API_KEY")
|
| 13 |
+
client = OpenAI(api_key=api_key)
|
| 14 |
+
|
| 15 |
+
# 1) Load your product catalog once at startup
|
| 16 |
+
def load_product_catalog(path="products.json"):
|
| 17 |
+
with open(path, "r", encoding="utf-8") as f:
|
| 18 |
+
data = json.load(f)
|
| 19 |
+
# Expecting products_desc to be a dict: { "iboothme X": "…", … }
|
| 20 |
+
return data["products_desc"]
|
| 21 |
+
|
| 22 |
+
PRODUCT_CATALOG = load_product_catalog()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def count_tokens(text: str, model: str = "gpt-4") -> int:
|
| 27 |
+
try:
|
| 28 |
+
encoding = tiktoken.encoding_for_model(model)
|
| 29 |
+
except KeyError:
|
| 30 |
+
encoding = tiktoken.get_encoding("cl100k_base")
|
| 31 |
+
return len(encoding.encode(text))
|
| 32 |
+
|
| 33 |
+
# 2) Helper to pull full descriptions for a list of product names
|
| 34 |
+
def get_product_descriptions(product_names: list[str]) -> str:
|
| 35 |
+
entries = []
|
| 36 |
+
for name in product_names:
|
| 37 |
+
desc = PRODUCT_CATALOG.get(name)
|
| 38 |
+
if desc:
|
| 39 |
+
entries.append(f"**{name}**\n{desc}")
|
| 40 |
+
return "\n\n".join(entries)
|
| 41 |
+
|
| 42 |
+
# Keyword extraction from the paragraph
|
| 43 |
+
def extract_keywords(paragraph: str) -> list[str]:
|
| 44 |
+
prompt = f"""
|
| 45 |
+
You are an expert in experiential event planning.
|
| 46 |
+
Extract 5-10 short, specific, and thematic keywords or concepts from the event description below. These will be used to inspire immersive, tech-powered event ideas.
|
| 47 |
+
Each keyword should be 2-4 words long and describe a concrete idea or theme (e.g., "photo booths", "smart vending", "interactive storytelling").
|
| 48 |
+
Event Description:
|
| 49 |
+
\"{paragraph}\"
|
| 50 |
+
Return the keywords as a comma-separated list.
|
| 51 |
+
"""
|
| 52 |
+
response = client.chat.completions.create(
|
| 53 |
+
model="gpt-4",
|
| 54 |
+
messages=[{"role": "user", "content": prompt}],
|
| 55 |
+
temperature=0.7,
|
| 56 |
+
max_tokens=200
|
| 57 |
+
)
|
| 58 |
+
raw = response.choices[0].message.content
|
| 59 |
+
return [kw.strip().lower() for kw in re.split(r'[,\n]', raw) if kw.strip()]
|
| 60 |
+
|
| 61 |
+
# (Optional) Keyword extraction from titles/links
|
| 62 |
+
def extract_keywords_from_title_and_link(title: str, link: str) -> list[str]:
|
| 63 |
+
prompt = f"""
|
| 64 |
+
You are an expert in event innovation.
|
| 65 |
+
Given the title and link below, extract 3-5 short, specific, and meaningful keywords or themes (2-4 words each) that describe what the page is about.
|
| 66 |
+
Title: {title}
|
| 67 |
+
Link: {link}
|
| 68 |
+
Return the keywords as a comma-separated list.
|
| 69 |
+
"""
|
| 70 |
+
response = client.chat.completions.create(
|
| 71 |
+
model="gpt-4",
|
| 72 |
+
messages=[{"role": "user", "content": prompt}],
|
| 73 |
+
temperature=0.6,
|
| 74 |
+
max_tokens=150
|
| 75 |
+
)
|
| 76 |
+
raw = response.choices[0].message.content
|
| 77 |
+
return [kw.strip().lower() for kw in re.split(r'[,\n]', raw) if kw.strip()]
|
| 78 |
+
|
| 79 |
+
# (Optional) Web search for inspiration
|
| 80 |
+
def search_similar_events_and_products_openai(keywords: list[str]) -> list[tuple[str,str]]:
|
| 81 |
+
input_text = f"Generate 10 useful URLs for experiential event ideas or iboothme.com inspiration related to the keywords: {', '.join(keywords)}"
|
| 82 |
+
try:
|
| 83 |
+
response = client.responses.create(
|
| 84 |
+
model="gpt-4.1",
|
| 85 |
+
tools=[{"type": "web_search_preview"}],
|
| 86 |
+
input=input_text
|
| 87 |
+
)
|
| 88 |
+
content = response.output_text
|
| 89 |
+
results = []
|
| 90 |
+
for line in content.split("\n"):
|
| 91 |
+
if "http" in line:
|
| 92 |
+
parts = line.split(" - ", 1)
|
| 93 |
+
if len(parts) == 2:
|
| 94 |
+
results.append((parts[0].strip(), parts[1].strip()))
|
| 95 |
+
else:
|
| 96 |
+
url = line.strip()
|
| 97 |
+
results.append((url, url))
|
| 98 |
+
return results[:10]
|
| 99 |
+
except Exception as e:
|
| 100 |
+
print("Search failed:", e)
|
| 101 |
+
return []
|
| 102 |
+
|
| 103 |
+
# Core idea generation, enriched with random product descriptions
|
| 104 |
+
def generate_event_ideas(
|
| 105 |
+
paragraph: str,
|
| 106 |
+
product_info: str,
|
| 107 |
+
search_links: list[tuple[str,str]],
|
| 108 |
+
all_keywords: list[str],
|
| 109 |
+
idea_count: int
|
| 110 |
+
) -> str:
|
| 111 |
+
search_summary = "\n".join([f"- {title}: {url}" for title, url in search_links])
|
| 112 |
+
include_games = any("game" in kw for kw in all_keywords)
|
| 113 |
+
game_instruction = "Include at least two game-related ideas (e.g., quiz game, vending challenge)." if include_games else ""
|
| 114 |
+
|
| 115 |
+
examples = """
|
| 116 |
+
Carefully analyze these examples to understand the kind of events iboothme typically does. Use this knowledge to shape your new ideas accordingly.
|
| 117 |
+
|
| 118 |
+
1. **Pedal-Powered Smoothie Activation (Philips)**
|
| 119 |
+
Guests cycle to virtually blend a smoothie. Once the digital blending completes, a real smoothie or branded item is dispensed.
|
| 120 |
+
|
| 121 |
+
2. **Interactive Foosball with Smart Tech**
|
| 122 |
+
Classic foosball is enhanced with real-time goal sensors, AI commentary, lighting, and fog effects for an immersive, competitive experience.
|
| 123 |
+
|
| 124 |
+
3. **Mystery Phone Giftbox Game**
|
| 125 |
+
A phone booth randomly rings. The first guest to answer receives a code to try and unlock a branded giftbox prize.
|
| 126 |
+
|
| 127 |
+
4. **Autotune Karaoke Booth**
|
| 128 |
+
Guests sing karaoke; the system auto-enhances their voice and records a fun branded music video for sharing.
|
| 129 |
+
|
| 130 |
+
5. **Precision Ball Challenge**
|
| 131 |
+
Guests score points by throwing balls into different-sized holes—smaller holes yield more points. A live leaderboard adds to the excitement.
|
| 132 |
+
|
| 133 |
+
6. **Virtual Product Customization (Nike)**
|
| 134 |
+
Kids scan a QR code, customize virtual products (like shoes or gear), and submit details to be notified when it's ready—blending gamification and CRM.
|
| 135 |
+
|
| 136 |
+
7. **Digital Ramadan or Eid Games**
|
| 137 |
+
Gamified web-based experiences that celebrate festive moments (e.g., quiz vending machines, dua generators, or memory games with prizes).
|
| 138 |
+
|
| 139 |
+
8. **Gamified Vending (Virgin, Makeup For Ever)**
|
| 140 |
+
Guests activate vending machines via QR code or interactive game. Winners get physical prizes, digital souvenirs, or brand samples,a unique code unlocks a real-world giftbox.
|
| 141 |
+
|
| 142 |
+
9. **Venom-Themed AI Photo Booth**
|
| 143 |
+
An immersive, themed booth where guests take selfies that are transformed with custom visual effects tied to the Venom movie.
|
| 144 |
+
|
| 145 |
+
10. **Virtual Mosaic Wall**
|
| 146 |
+
Each participant’s selfie or message contributes to a larger digital mosaic displayed on a screen, forming a logo or image over time.
|
| 147 |
+
|
| 148 |
+
11. **Sanitizer Dispenser Booth with Data Capture**
|
| 149 |
+
Hygiene stations that combine sanitizer use with fun branded interactions, collecting engagement data during activation.
|
| 150 |
+
|
| 151 |
+
12. **Live-Draw Photo Booth with Projection**
|
| 152 |
+
Guests take a photo, which gets branded and projected live on big screens in a visual story format (e.g., mural or timeline).
|
| 153 |
+
|
| 154 |
+
13. **Giftbox Quiz Station**
|
| 155 |
+
Guests answer brand-related quiz questions. Correct answers unlock a surprise giftbox reward. Fun, educational, and shareable.
|
| 156 |
+
|
| 157 |
+
14. **AI Doodle-to-Art Transformation**
|
| 158 |
+
Guests draw a doodle on-screen; AI turns it into digital art, which they can download or print on souvenirs.
|
| 159 |
+
"""
|
| 160 |
+
prompt = f"""
|
| 161 |
+
|
| 162 |
+
#### Important Instructions To Perform Before Generating Ideas:
|
| 163 |
+
-Before you begin, clearly look for real-world ideas previously done by iboothme in below triple backtick.
|
| 164 |
+
{examples}
|
| 165 |
+
-Use these as inspiration to understand the **ideas they use for there events**, visual style, and creative concepts they typically use.
|
| 166 |
+
-Incorporate this knowledge into the ideation process to ensure all concepts align with iboothme’s authentic brand portfolio.
|
| 167 |
+
-Look for Iboothme existing products to get the knowldge of products they use for genrating and designing ideas for event, below is the description of their products in backtick:
|
| 168 |
+
{product_info}
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
#### Very Very Important:
|
| 172 |
+
-Ideas should be according to the event descrition - like what the Description is about.
|
| 173 |
+
-Always use simple wording that is easy to understand - ** no high level english or words**.
|
| 174 |
+
-Ideas should be **Unique and realistic in a way that they can be implemented**.
|
| 175 |
+
-Don't make impossible to implement ideas.
|
| 176 |
+
-Ideas should meet the persona of iboothme and can be implemented using iboothme product.
|
| 177 |
+
#### Task To Do:
|
| 178 |
+
-You are an expert event strategist for iboothme, a company offering creative experiences like AI photo booths, smart vending machines, audio booths, personalization stations, immersive visual storytellingetc etc.
|
| 179 |
+
-Below are full descriptions of three randomly selected iboothme products, to keep all ideas on-brand , the Description of event client wants to do and the inspiration from related ideas:
|
| 180 |
+
```{product_info}```
|
| 181 |
+
Event Description:
|
| 182 |
+
```{paragraph}```
|
| 183 |
+
Inspiration from Related Ideas:
|
| 184 |
+
```{search_summary}```
|
| 185 |
+
#### Real iboothme-style ideas:
|
| 186 |
+
{examples}
|
| 187 |
+
-Your task is to design and generate {idea_count} creative and compelling event concepts based on the knowledge you gather about iboothme persona , their existing event ideas in above examples ,their existing products description and inspiration from related ideas
|
| 188 |
+
-These ideas will be pitched to clients, so they must feel premium, memorable, and on-brand.
|
| 189 |
+
|
| 190 |
+
####Important Guidelines:
|
| 191 |
+
-Do not list product names directly. Instead, embed iboothme capabilities (e.g., smart booths, photo moments, personalized merch, interactive vending etc) implicitly in the concept.
|
| 192 |
+
-Include one game-style idea and one Studio Ghibli-style visual theme
|
| 193 |
+
-Personalized giveaways (e.g., custom t-shirts, stickers, Labibu dolls)
|
| 194 |
+
{game_instruction}
|
| 195 |
+
-Include subtle user journey or emotional takeaway
|
| 196 |
+
-Use iboothme’s brand tone: light, simple, fun, and emotionally engaging
|
| 197 |
+
|
| 198 |
+
#### Important:
|
| 199 |
+
-Avoid AR, VR, holograms, or projection domes
|
| 200 |
+
-Do not repeat photo‑booth formats
|
| 201 |
+
|
| 202 |
+
#### Output Format -Event Idea Format (for each idea):
|
| 203 |
+
1. **Catchy Title**
|
| 204 |
+
2. **Concept Paragraph** — "Idea" Briefly describe what the idea is about. Keep it simple and imaginative.
|
| 205 |
+
3. **User Journey Paragraph** —"User Journey" Describe exactly what a guest would experience at the activation.
|
| 206 |
+
Include:
|
| 207 |
+
- What they first see and feel
|
| 208 |
+
- How they interact (step-by-step)
|
| 209 |
+
- What emotional moments or surprises are included
|
| 210 |
+
- What personalized item or memory they take away
|
| 211 |
+
|
| 212 |
+
Return only the final ideas in markdown format.
|
| 213 |
+
"""
|
| 214 |
+
|
| 215 |
+
# Count tokens BEFORE sending
|
| 216 |
+
token_count = count_tokens(prompt, model="gpt-4")
|
| 217 |
+
print(f"🔢 Prompt Token Count: {token_count}")
|
| 218 |
+
|
| 219 |
+
resp = client.chat.completions.create(
|
| 220 |
+
model="gpt-4",
|
| 221 |
+
messages=[{"role": "user", "content": prompt}],
|
| 222 |
+
temperature=0.95,
|
| 223 |
+
max_tokens=1500
|
| 224 |
+
)
|
| 225 |
+
return resp.choices[0].message.content
|
| 226 |
+
|
| 227 |
+
# Main orchestration
|
| 228 |
+
def main_workflow(paragraph: str) -> str:
|
| 229 |
+
print("main_workflow called with paragraph:", paragraph)
|
| 230 |
+
if not paragraph.strip():
|
| 231 |
+
print("No paragraph provided.")
|
| 232 |
+
return "❌ Please enter an event description."
|
| 233 |
+
|
| 234 |
+
# 1. Randomly pick 3 products from your catalog
|
| 235 |
+
try:
|
| 236 |
+
gadget_names = random.sample(list(PRODUCT_CATALOG.keys()), k=14)
|
| 237 |
+
print("Randomly selected products:", gadget_names)
|
| 238 |
+
product_info = get_product_descriptions(gadget_names)
|
| 239 |
+
except Exception as e:
|
| 240 |
+
print("Error selecting products:", e)
|
| 241 |
+
return f"❌ Error selecting products: {e}"
|
| 242 |
+
|
| 243 |
+
# 2. Gather keywords + optional web search
|
| 244 |
+
try:
|
| 245 |
+
base_kw = extract_keywords(paragraph)
|
| 246 |
+
print("Extracted base keywords:", base_kw)
|
| 247 |
+
links = search_similar_events_and_products_openai(base_kw)
|
| 248 |
+
print("Found links:", links)
|
| 249 |
+
link_kw = []
|
| 250 |
+
for t, u in links:
|
| 251 |
+
kws = extract_keywords_from_title_and_link(t, u)
|
| 252 |
+
print(f"Extracted keywords from link ({t}, {u}):", kws)
|
| 253 |
+
link_kw.extend(kws)
|
| 254 |
+
all_kw = sorted(set(base_kw + link_kw))
|
| 255 |
+
print("All keywords:", all_kw)
|
| 256 |
+
except Exception as e:
|
| 257 |
+
print("Error in keyword extraction or web search:", e)
|
| 258 |
+
return f"❌ Error in keyword extraction or web search: {e}"
|
| 259 |
+
|
| 260 |
+
# 3. Generate ideas
|
| 261 |
+
try:
|
| 262 |
+
idea_count = 7
|
| 263 |
+
print("Idea count:", idea_count)
|
| 264 |
+
ideas_md = generate_event_ideas(paragraph, product_info, links, all_kw, idea_count)
|
| 265 |
+
print("Generated ideas markdown.")
|
| 266 |
+
except Exception as e:
|
| 267 |
+
print("Error generating ideas:", e)
|
| 268 |
+
return f"❌ Error generating ideas: {e}"
|
| 269 |
+
|
| 270 |
+
# 4. Summarize top keywords
|
| 271 |
+
summaries = []
|
| 272 |
+
for kw in all_kw[:10]:
|
| 273 |
+
try:
|
| 274 |
+
print(f"Summarizing keyword: {kw}")
|
| 275 |
+
r = client.chat.completions.create(
|
| 276 |
+
model="gpt-4",
|
| 277 |
+
messages=[{"role": "user", "content": f"Give a short one-line event idea description using the keyword: {kw}"}],
|
| 278 |
+
temperature=0.6,
|
| 279 |
+
max_tokens=60
|
| 280 |
+
)
|
| 281 |
+
desc = r.choices[0].message.content.strip()
|
| 282 |
+
summaries.append(f"- **{kw.title()}**: {desc}")
|
| 283 |
+
except Exception as e:
|
| 284 |
+
print(f"Error summarizing keyword {kw}:", e)
|
| 285 |
+
summaries.append(f"- **{kw.title()}**")
|
| 286 |
+
|
| 287 |
+
summary_md = "\n".join(summaries)
|
| 288 |
+
print("Returning final markdown output.")
|
| 289 |
+
return f"""
|
| 290 |
+
🌐 **Relevant Keywords :**
|
| 291 |
+
{summary_md}
|
| 292 |
+
{ideas_md}
|
| 293 |
+
"""
|
| 294 |
+
# 8) Styling and Gradio interface
|
| 295 |
+
custom_theme = gr.themes.Base(
|
| 296 |
+
primary_hue="purple",
|
| 297 |
+
secondary_hue="purple",
|
| 298 |
+
neutral_hue="gray"
|
| 299 |
+
).set(
|
| 300 |
+
body_background_fill="white",
|
| 301 |
+
block_background_fill="white",
|
| 302 |
+
block_border_width="2px",
|
| 303 |
+
block_border_color="#a18cd1",
|
| 304 |
+
button_primary_background_fill="linear-gradient(90deg, #a18cd1 0%, #fbc2eb 100%)",
|
| 305 |
+
button_primary_text_color="white",
|
| 306 |
+
input_background_fill="white",
|
| 307 |
+
input_border_color="#a18cd1"
|
| 308 |
+
)
|
| 309 |
+
|
| 310 |
+
custom_css = """
|
| 311 |
+
#iboothme-heading {
|
| 312 |
+
font-weight: 900 !important;
|
| 313 |
+
font-size: 2.5rem !important;
|
| 314 |
+
background: linear-gradient(90deg, #a18cd1 0%, #fbc2eb 100%);
|
| 315 |
+
-webkit-background-clip: text;
|
| 316 |
+
-webkit-text-fill-color: black;
|
| 317 |
+
margin-bottom: 0.5em;
|
| 318 |
+
text-align: center;
|
| 319 |
+
letter-spacing: 1px;
|
| 320 |
+
}
|
| 321 |
+
#desc-subheading {
|
| 322 |
+
text-align: center;
|
| 323 |
+
font-size: 1.15rem;
|
| 324 |
+
font-weight: 500;
|
| 325 |
+
color: #6d4fa7;
|
| 326 |
+
margin-bottom: 2em;
|
| 327 |
+
}
|
| 328 |
+
.gradio-container { min-height: 100vh; }
|
| 329 |
+
.gr-box, .gr-input, .gr-button, .gr-markdown, .gr-textbox, .gr-column, .gr-row {
|
| 330 |
+
border-radius: 18px !important;
|
| 331 |
+
}
|
| 332 |
+
#event-desc-box {
|
| 333 |
+
border: 2px solid #a18cd1 !important;
|
| 334 |
+
box-shadow: 0 4px 24px 0 rgba(161,140,209,0.10) !important;
|
| 335 |
+
background: white !important;
|
| 336 |
+
}
|
| 337 |
+
#generate-btn {
|
| 338 |
+
font-weight: bold;
|
| 339 |
+
font-size: 1.1rem;
|
| 340 |
+
background: linear-gradient(90deg, #a18cd1 0%, #fbc2eb 100%) !important;
|
| 341 |
+
color: white !important;
|
| 342 |
+
border-radius: 12px !important;
|
| 343 |
+
box-shadow: 0 2px 8px 0 rgba(161,140,209,0.10) !important;
|
| 344 |
+
margin-top: 1.5em;
|
| 345 |
+
}
|
| 346 |
+
#output-box {
|
| 347 |
+
border: 2px solid #a18cd1 !important;
|
| 348 |
+
box-shadow: 0 4px 24px 0 rgba(161,140,209,0.10) !important;
|
| 349 |
+
background: black !important;
|
| 350 |
+
color: white !important;
|
| 351 |
+
}
|
| 352 |
+
"""
|
| 353 |
+
|
| 354 |
+
with gr.Blocks(title="iboothme Event Ideation App") as demo:
|
| 355 |
+
gr.Markdown(
|
| 356 |
+
"<div id='iboothme-heading'>🎉 <b>iboothme Event Idea Generator</b></div>"
|
| 357 |
+
"<div id='desc-subheading'>Describe your event goal and receive interactive, tech‑powered ideas!</div>"
|
| 358 |
+
)
|
| 359 |
+
with gr.Row():
|
| 360 |
+
with gr.Column(scale=2):
|
| 361 |
+
paragraph = gr.Textbox(
|
| 362 |
+
label="📝 Describe Your Event (e.g. Women’s Day, Product Launch)",
|
| 363 |
+
lines=4,
|
| 364 |
+
elem_id="event-desc-box"
|
| 365 |
+
)
|
| 366 |
+
with gr.Column(scale=1, min_width=220):
|
| 367 |
+
submit_btn = gr.Button("🚀 Generate Event Concepts", elem_id="generate-btn")
|
| 368 |
+
output = gr.Markdown(elem_id="output-box")
|
| 369 |
+
|
| 370 |
+
submit_btn.click(
|
| 371 |
+
fn=main_workflow,
|
| 372 |
+
inputs=[paragraph],
|
| 373 |
+
outputs=output,
|
| 374 |
+
show_progress=True
|
| 375 |
+
)
|
| 376 |
+
|
| 377 |
+
demo.launch(inline=False, share=True)
|
products.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"products_desc": {
|
| 3 |
+
"Glamdroid": "The Glamdroid is a robotic camera arm that delivers Hollywood‑style slow‑motion videos on demand—perfect for red‑carpet, VIP, or corporate activations. With robotic precision its arm sweeps smoothly around guests; interactive controls let attendees strike poses; and instant playback makes every moment shareable on social media. Ideal for red‑carpet events, weddings, and trade shows, the Glamdroid works by having guests step into its frame, triggering the arm to record cinematic clips that are processed and displayed in seconds—boosting engagement and driving viral buzz.",
|
| 4 |
+
"iboothme X": "The iboothme X is an AI‑powered photo booth that transforms ordinary snapshots into studio‑quality, branded masterpieces. It uses AI lighting and beauty filters to enhance faces, AI dress overlays to showcase your logo, and AI backgrounds or painting modes for limitless creativity. Perfect for corporate events, product launches, and virtual gatherings, iboothme X requires no internet—simply step in, strike a pose, and receive personalized, high‑resolution images via email or SMS within seconds.",
|
| 5 |
+
"Vending machine": "The interactive vending machine from iboothme turns sample distribution into an immersive game. Guests complete quizzes or social‑media tasks at the touchscreen—then watch as prizes or branded merchandise dispense automatically. With customizable wraps, data capture forms, and game modules, it’s ideal for retail pop‑ups, festivals, and experiential marketing campaigns. After setup and branding, participants engage via on‑screen challenges; once they succeed, the machine releases their reward while capturing valuable lead data for follow‑up.",
|
| 6 |
+
"Claw machine": "The Claw machine brings classic arcade entertainment to any activation, letting guests maneuver a joystick or smartphone interface to grab event‑branded goodies. Key features include adjustable claw strength, full‑color exterior wraps, and real‑time analytics to track plays and success rates. Perfect for trade shows, weddings, and mall activations, it operates by inviting players to align the claw over a prize, lower it with a press, and (hopefully) grip a reward—generating lines, engagement, and data for your CRM.",
|
| 7 |
+
"Retro Photo booth": "The Retro Photo booth blends nostalgic flair with modern tech: a sleek enclosure, cushioned leather seats, and high‑resolution DSLR cameras produce timeless prints. With instant dye‑sublimation printing, custom filmstrip layouts, and optional digital sharing, it’s ideal for weddings, corporate galas, and private parties. Guests step inside, select a filter or frame, pose for a series of shots, and walk away with both physical keepsakes and digital files shared instantly via email or QR code.",
|
| 8 |
+
"Mega Vending": "Mega Vending scales up the interactive vending concept to serve thousands in one activation. Its larger footprint accommodates oversized prizes and multiple game stations, while modular UI panels let you swap quizzes, spin‑to‑win wheels, or time‑attack challenges. Best for large conventions, festivals, and stadium events, Mega Vending invites attendees to engage in branded missions on touchscreens; on success, the machine dispenses premium gifts or samples—collecting user data at every step.",
|
| 9 |
+
"360 videobooth": "The 360 videobooth uses a motorized arm to rotate a camera around stationary guests, capturing dynamic, full‑circle videos and GIFs. Offering HD slow‑motion, custom overlays, and instant social sharing, it’s perfect for weddings, brand activations, and product launches. Guests stand on the platform, trigger the spin, and within moments receive a polished, share‑ready clip via QR or email—delivering unforgettable content and rich engagement metrics.",
|
| 10 |
+
"goboothme X": "goboothmeX is a roaming photo booth on wheels, powered by AI to identify faces, adjust lighting, and snap candid shots throughout your venue. With autonomous navigation, instant digital delivery, and CRM integration, it’s ideal for trade shows, hospitality events, and sprawling outdoor festivals. Operators guide it through guest areas, the onboard camera captures interactions on‑the‑fly, and participants receive their branded images instantly—boosting roaming engagement and data capture.",
|
| 11 |
+
"Holobox": "The Holobox projects 3D holographic visuals of your products, logos, or live demos within a compact glass enclosure. Featuring true volumetric projection, interactive smartphone controls, and live‑stream capabilities, it’s perfect for product launches, retail windows, and conference booths. Load your 3D assets or live feed, power on the unit, and watch as guests manipulate holograms via touchscreen or mobile—a futuristic showcase that captivates and converts.",
|
| 12 |
+
"Giftbox": "The Giftbox gamifies giveaways by letting participants answer quizzes, spin wheels, or complete mini‑games to unlock coupons, samples, or promo codes. With email capture, analytics dashboard, and custom branding, it excels at retail promotions, trade show giveaways, and campus activations. Guests tap through an on‑screen challenge, submit their email for data capture, and receive a unique digital code or physical reward—ensuring both engagement and valuable lead generation.",
|
| 13 |
+
"Mirror booth": "The Mirror booth combines a full‑length reflective touchscreen with animated UI for a refined, self‑guided photo experience. Key features include on‑mirror signatures, augmented reality stickers, and instant prints. Ideal for weddings, corporate holiday parties, and brand activations, it works by prompting guests on the mirror’s surface to pose, personalize their image, then print or share digitally—creating elegant souvenirs and measurable engagement.",
|
| 14 |
+
"120 slider": "The 120 slider is a motorized camera rig that glides along a 120 cm arc, capturing sweeping boomerang videos and GIFs. With smooth linear motion, branded overlays, and social‑media integration, it’s suited for fashion events, trade shows, and experiential pop‑ups. Set the camera on the slider track, have guests pose or walk, and the system generates a dynamic loop that’s instantly available for sharing—producing memorable, high‑impact content.",
|
| 15 |
+
"Arcade Vending": "Arcade Vending blends classic arcade gameplay with prize dispensing: participants play branded mini‑games on a cabinet to earn tokens that trigger snack or sample drops. Featuring LED marquees, joystick controls, and real‑time scoring, it thrives at gaming expos, college fests, and mall activations. Players insert a code or token, compete for high scores, then watch as the vending bay unlocks their earned reward—fueling competition and data insights.",
|
| 16 |
+
"Catch Baton": "The Catch Baton is a handheld, touchscreen baton that lights up in sequences guests must tap in time to earn points and prizes. With reflex‑training games, leaderboard integration, and custom reward logic, it’s perfect for team‑building events, product launches, and sports marketing. Users pick up the baton, follow on‑screen prompts to tap lit targets, and upon completion receive digital badges or physical gifts—capturing performance data and driving friendly competition."
|
| 17 |
+
}
|
| 18 |
+
}
|
requirements.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio
|
| 2 |
+
openai
|
| 3 |
+
python-dotenv
|