Spaces:
Sleeping
Sleeping
| import os | |
| import threading | |
| import discord | |
| import requests | |
| import gradio as gr | |
| from discord.ext import commands | |
| DISCORD_TOKEN = os.getenv("DISCORD_TOKEN") | |
| HF_API_TOKEN = os.getenv("HF_API_TOKEN") | |
| HF_TEXT_MODEL = os.getenv("HF_TEXT_MODEL") | |
| HF_IMAGE_MODEL = os.getenv("HF_IMAGE_MODEL") | |
| intents = discord.Intents.default() | |
| bot = commands.Bot(command_prefix="/", intents=intents) | |
| async def on_ready(): | |
| print(f"🩸 CultCore online as {bot.user}") | |
| async def initiate(ctx): | |
| await ctx.send("⚫ Initiation complete. CultCore awakened.") | |
| async def status(ctx): | |
| await ctx.send("🩸 CultCore running inside Hugging Face Space.") | |
| def run_bot(): | |
| bot.run(DISCORD_TOKEN) | |
| def dummy_ui(): | |
| return "CultCore is alive." | |
| # Запускаем Discord-бот в фоне | |
| threading.Thread(target=run_bot).start() | |
| # Пустой Gradio UI (чтобы Space не умер) | |
| gr.Interface( | |
| fn=dummy_ui, | |
| inputs=[], | |
| outputs="text", | |
| title="CultCore Core", | |
| description="Black/Red techno cult AI is running." | |
| ).launch() |