Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -61,8 +61,9 @@ async def syncMessages():
|
|
61 |
o = f.read().split("<|end_of_turn|>")
|
62 |
for item in o:
|
63 |
item = item.split(": ", 1)
|
64 |
-
|
65 |
-
|
|
|
66 |
|
67 |
@client.event
|
68 |
async def on_ready():
|
@@ -117,8 +118,6 @@ async def on_message(message):
|
|
117 |
f"GPT4 Correct system: {sysp}<|end_of_turn|>GPT4 Correct {message.author}: {message.content}<|end_of_turn|>"
|
118 |
)
|
119 |
except:
|
120 |
-
f = open(f"data/{guild_name}/{msgchannel_name}", "w")
|
121 |
-
f.close()
|
122 |
with open(f"data/{guild_name}/{msgchannel_name}", "a") as f:
|
123 |
n = "\n"
|
124 |
f.write(
|
|
|
61 |
o = f.read().split("<|end_of_turn|>")
|
62 |
for item in o:
|
63 |
item = item.split(": ", 1)
|
64 |
+
if len(item) < 2:
|
65 |
+
return 0
|
66 |
+
st.markdown(f":blue[{item.split("GPT4 Correct ")[0]}]: {item[1]}")
|
67 |
|
68 |
@client.event
|
69 |
async def on_ready():
|
|
|
118 |
f"GPT4 Correct system: {sysp}<|end_of_turn|>GPT4 Correct {message.author}: {message.content}<|end_of_turn|>"
|
119 |
)
|
120 |
except:
|
|
|
|
|
121 |
with open(f"data/{guild_name}/{msgchannel_name}", "a") as f:
|
122 |
n = "\n"
|
123 |
f.write(
|