[main] syncing with deepfloydif.py
Browse files
app.py
CHANGED
|
@@ -17,6 +17,11 @@ import glob
|
|
| 17 |
import falcon
|
| 18 |
from falcon import try_falcon
|
| 19 |
from falcon import continue_falcon
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
#-------------------------------------------------------------------------------------------------------------------------------------
|
| 21 |
MY_GUILD = discord.Object(id=1077674588122648679) # HF = 879548962464493619, test = 1077674588122648679
|
| 22 |
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
|
@@ -62,6 +67,18 @@ async def on_message(message):
|
|
| 62 |
except Exception as e:
|
| 63 |
print(f"Error: {e}")
|
| 64 |
#-------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
# running in thread
|
| 66 |
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
| 67 |
def run_bot():
|
|
|
|
| 17 |
import falcon
|
| 18 |
from falcon import try_falcon
|
| 19 |
from falcon import continue_falcon
|
| 20 |
+
|
| 21 |
+
import deepfloydif
|
| 22 |
+
from deepfloydif import try_deepfloydif
|
| 23 |
+
|
| 24 |
+
|
| 25 |
#-------------------------------------------------------------------------------------------------------------------------------------
|
| 26 |
MY_GUILD = discord.Object(id=1077674588122648679) # HF = 879548962464493619, test = 1077674588122648679
|
| 27 |
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
|
|
|
| 67 |
except Exception as e:
|
| 68 |
print(f"Error: {e}")
|
| 69 |
#-------------------------------------------------------------------------------------------------------------------------------------
|
| 70 |
+
@client.tree.command()
|
| 71 |
+
@app_commands.describe(
|
| 72 |
+
prompt='Enter a prompt to generate an image! Can generate realistic text, too!')
|
| 73 |
+
async def deepfloydif(interaction: discord.Interaction, prompt: str):
|
| 74 |
+
try:
|
| 75 |
+
await try_deepfloydif(interaction, prompt)
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
except Exception as e:
|
| 79 |
+
print(f"Error: {e}")
|
| 80 |
+
#-------------------------------------------------------------------------------------------------------------------------------------
|
| 81 |
+
#-------------------------------------------------------------------------------------------------------------------------------------
|
| 82 |
# running in thread
|
| 83 |
DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None)
|
| 84 |
def run_bot():
|