Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,171 +9,46 @@ from Gradio_UI import GradioUI
|
|
9 |
|
10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
11 |
@tool
|
12 |
-
def
|
13 |
-
"""
|
14 |
|
15 |
Args:
|
16 |
-
text: The input text to
|
17 |
-
void_intensity: Float between 0 and 1 determining how dark the translation becomes (default 0.7)
|
18 |
-
|
19 |
-
Example:
|
20 |
-
Input: "I want to sleep and dream"
|
21 |
-
Output: "⋆。✧ i seek to transcend into the void's embrace and drift through ethereal nightmares ⭑⋆✩ *exists in darkness*"
|
22 |
"""
|
23 |
import random
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
# Basic emotional states
|
28 |
-
"happy": "blessed by the void",
|
29 |
-
"sad": "embraced by shadows",
|
30 |
-
"angry": "consumed by dark flames",
|
31 |
-
"tired": "drained by the abyss",
|
32 |
-
"excited": "awakened by dark energy",
|
33 |
-
|
34 |
-
# Common verbs
|
35 |
-
"sleep": "transcend into the void's embrace",
|
36 |
-
"wake": "emerge from the darkness",
|
37 |
-
"eat": "consume essence",
|
38 |
-
"drink": "absorb dark matter",
|
39 |
-
"walk": "drift through shadows",
|
40 |
-
"run": "flee through the void",
|
41 |
-
"work": "perform eternal tasks",
|
42 |
-
"think": "commune with the void",
|
43 |
-
"see": "perceive through darkness",
|
44 |
-
"hear": "sense ethereal whispers",
|
45 |
-
"speak": "whisper to the void",
|
46 |
-
"write": "inscribe in shadows",
|
47 |
-
"read": "decrypt void runes",
|
48 |
-
"love": "form bonds in darkness",
|
49 |
-
"hate": "channel void entropy",
|
50 |
-
"live": "exist in twilight",
|
51 |
-
"die": "merge with the void",
|
52 |
-
|
53 |
-
# Time-related
|
54 |
-
"morning": "dawn of shadows",
|
55 |
-
"afternoon": "peak of darkness",
|
56 |
-
"evening": "twilight hour",
|
57 |
-
"night": "true darkness",
|
58 |
-
"today": "this cycle of existence",
|
59 |
-
"tomorrow": "next void rotation",
|
60 |
-
"yesterday": "previous dark cycle",
|
61 |
-
"forever": "for all eternal darkness",
|
62 |
-
"never": "in no realm of existence",
|
63 |
-
|
64 |
-
# Places
|
65 |
-
"home": "void sanctuary",
|
66 |
-
"work": "realm of eternal tasks",
|
67 |
-
"school": "academy of dark knowledge",
|
68 |
-
"store": "void market",
|
69 |
-
"outside": "beyond the veil",
|
70 |
-
"inside": "within the shadows",
|
71 |
-
"room": "dark chamber",
|
72 |
-
"house": "shadow dwelling",
|
73 |
-
"office": "void workspace",
|
74 |
-
|
75 |
-
# People and relationships
|
76 |
-
"friend": "void companion",
|
77 |
-
"enemy": "light dweller",
|
78 |
-
"family": "shadow kindred",
|
79 |
-
"mother": "void matriarch",
|
80 |
-
"father": "shadow patriarch",
|
81 |
-
"sister": "fellow void daughter",
|
82 |
-
"brother": "fellow void son",
|
83 |
-
"teacher": "void sage",
|
84 |
-
"student": "shadow apprentice",
|
85 |
-
"boss": "void overseer",
|
86 |
-
"colleague": "fellow darkness dweller",
|
87 |
-
|
88 |
-
# Objects
|
89 |
-
"phone": "void communicator",
|
90 |
-
"computer": "shadow processor",
|
91 |
-
"book": "tome of darkness",
|
92 |
-
"pen": "void inscriber",
|
93 |
-
"paper": "shadow parchment",
|
94 |
-
"food": "void sustenance",
|
95 |
-
"water": "liquid darkness",
|
96 |
-
"money": "void tokens",
|
97 |
-
"clothes": "shadow garments",
|
98 |
-
|
99 |
-
# Abstract concepts
|
100 |
-
"time": "flow of darkness",
|
101 |
-
"space": "void expanse",
|
102 |
-
"life": "shadow existence",
|
103 |
-
"death": "void embrace",
|
104 |
-
"truth": "void wisdom",
|
105 |
-
"lie": "shadow deception",
|
106 |
-
"beauty": "dark radiance",
|
107 |
-
"ugly": "void-touched",
|
108 |
-
"good": "void-blessed",
|
109 |
-
"bad": "shadow-cursed",
|
110 |
-
|
111 |
-
# Common phrases
|
112 |
-
"hello": "greetings from the void",
|
113 |
-
"hi": "shadow salutations",
|
114 |
-
"goodbye": "fade into darkness",
|
115 |
-
"bye": "return to shadows",
|
116 |
-
"please": "by the void's grace",
|
117 |
-
"thank you": "gratitude from the darkness",
|
118 |
-
"sorry": "shadows of regret",
|
119 |
-
"excuse me": "pardon my darkness",
|
120 |
-
|
121 |
-
# Activities
|
122 |
-
"meeting": "void congregation",
|
123 |
-
"party": "shadow gathering",
|
124 |
-
"study": "dark contemplation",
|
125 |
-
"exercise": "shadow training",
|
126 |
-
"travel": "void wandering",
|
127 |
-
"shopping": "void acquisition",
|
128 |
-
"cooking": "shadow alchemy",
|
129 |
-
"cleaning": "purifying darkness",
|
130 |
-
|
131 |
-
# Feelings and states
|
132 |
-
"hungry": "void-emptied",
|
133 |
-
"thirsty": "shadow-parched",
|
134 |
-
"sleepy": "approaching transcendence",
|
135 |
-
"awake": "void-conscious",
|
136 |
-
"sick": "shadow-afflicted",
|
137 |
-
"healthy": "void-strengthened",
|
138 |
-
"busy": "consumed by tasks",
|
139 |
-
"free": "unbound by shadows"
|
140 |
-
}
|
141 |
|
142 |
-
#
|
143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
"*whispers to the void*",
|
154 |
-
"*channels dark essence*",
|
155 |
-
"*transcends mortality cutely*",
|
156 |
-
"*merges with darkness*",
|
157 |
-
"*absorbs cosmic energy*",
|
158 |
-
"*drifts through dimensions*",
|
159 |
-
"*emanates void presence*"
|
160 |
-
]
|
161 |
-
|
162 |
-
# Apply replacements based on void_intensity
|
163 |
-
result = text.lower()
|
164 |
-
for old, new in replacements.items():
|
165 |
-
if random.random() < void_intensity:
|
166 |
-
result = result.replace(old, new)
|
167 |
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
|
|
|
|
171 |
|
172 |
-
# Add
|
173 |
-
|
174 |
-
suffix += f" {random.choice(dark_actions)}"
|
175 |
|
176 |
-
return
|
177 |
|
178 |
@tool
|
179 |
def get_current_time_in_timezone(timezone: str) -> str:
|
@@ -212,7 +87,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
212 |
|
213 |
agent = CodeAgent(
|
214 |
model=model,
|
215 |
-
tools=[final_answer, get_current_time_in_timezone,
|
216 |
max_steps=6,
|
217 |
verbosity_level=1,
|
218 |
grammar=None,
|
|
|
9 |
|
10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
11 |
@tool
|
12 |
+
def make_greasy(text: str) -> str:
|
13 |
+
"""A tool that adds grease-themed flair to any text output.
|
14 |
|
15 |
Args:
|
16 |
+
text: The input text to make greasy
|
|
|
|
|
|
|
|
|
|
|
17 |
"""
|
18 |
import random
|
19 |
|
20 |
+
grease_stains = ["💧", "🛢️", "🫘", "⭕", "⚫", "🔴", "•"]
|
21 |
+
grease_smudges = [" ̶", " ̴", " ͜", " ̚", " ̸", "~", "_"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
+
# Add random grease drips and stains
|
24 |
+
greasy_text = ""
|
25 |
+
for char in text:
|
26 |
+
greasy_text += char
|
27 |
+
if random.random() < 0.1: # 10% chance for each character
|
28 |
+
greasy_text += random.choice(grease_stains)
|
29 |
+
if random.random() < 0.05: # 5% chance for smudges
|
30 |
+
greasy_text += random.choice(grease_smudges)
|
31 |
|
32 |
+
# Add grease-themed decorative border
|
33 |
+
width = max(len(line) for line in greasy_text.split('\n'))
|
34 |
+
border = "🛢️" * (width // 4)
|
35 |
+
|
36 |
+
greasy_result = f"""
|
37 |
+
{border}
|
38 |
+
WARNING: EXTREMELY GREASY CONTENT BELOW
|
39 |
+
{border}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
{greasy_text}
|
42 |
+
|
43 |
+
{border}
|
44 |
+
CAUTION: CONTENT MAY LEAVE STAINS
|
45 |
+
{border}
|
46 |
+
"""
|
47 |
|
48 |
+
# Add final grease disclaimer
|
49 |
+
greasy_result += "\n[This text has been professionally greased. Handle with care.]"
|
|
|
50 |
|
51 |
+
return greasy_result
|
52 |
|
53 |
@tool
|
54 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
87 |
|
88 |
agent = CodeAgent(
|
89 |
model=model,
|
90 |
+
tools=[final_answer, get_current_time_in_timezone, make_greasy], ## add your tools here (don't remove final answer)
|
91 |
max_steps=6,
|
92 |
verbosity_level=1,
|
93 |
grammar=None,
|