Spaces:
				
			
			
	
			
			
		Paused
		
	
	
	
			
			
	
	
	
	
		
		
		Paused
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -495,10 +495,10 @@ async def on_message(message): | |
| 495 | 
             
                            mscp = ec(output, "<|music|>", "<|music|>")[0]
         | 
| 496 | 
             
                            with open(f"data/{guild_name}/{msgchannel_name}", "a") as f:
         | 
| 497 | 
             
                                f.write(f"GPT4 Correct Assistant: {output}<|end_of_turn|>")
         | 
| 498 | 
            -
                            wds = output.split()
         | 
| 499 | 
             
                            for i in range(len(wds)):
         | 
| 500 | 
            -
                                title = ec(" ".join(wds)[:i], "<|title|>", "<|title|>")[0]
         | 
| 501 | 
            -
                                imgp = ec(" ".join(wds)[:i])[0]
         | 
| 502 | 
             
                                embed = discord.Embed(title=title,
         | 
| 503 | 
             
                                                      description=" ".join(wds)[:i + 1].replace(
         | 
| 504 | 
             
                                                          f"<|title|>{title}<|title|>", "").replace(f"<|image|>{imgp}<|image|>", ""), 
         | 
| @@ -516,7 +516,7 @@ async def on_message(message): | |
| 516 | 
             
                                    )
         | 
| 517 |  | 
| 518 | 
             
                                e = await message.reply(embed=embed)
         | 
| 519 | 
            -
                                asyncio.sleep(0.1)
         | 
| 520 | 
             
                        if imgp != "":
         | 
| 521 | 
             
                            np = """lowres, error, cropped, worst quality, low quality, ugly, duplicate, morbid, mutilated, out of frame, blurry, watermark, signature"""
         | 
| 522 | 
             
                            st = time.time()
         | 
|  | |
| 495 | 
             
                            mscp = ec(output, "<|music|>", "<|music|>")[0]
         | 
| 496 | 
             
                            with open(f"data/{guild_name}/{msgchannel_name}", "a") as f:
         | 
| 497 | 
             
                                f.write(f"GPT4 Correct Assistant: {output}<|end_of_turn|>")
         | 
| 498 | 
            +
                            wds = output.split(" ")
         | 
| 499 | 
             
                            for i in range(len(wds)):
         | 
| 500 | 
            +
                                title = ec(" ".join(wds)[:i + 1], "<|title|>", "<|title|>")[0]
         | 
| 501 | 
            +
                                imgp = ec(" ".join(wds)[:i + 1])[0]
         | 
| 502 | 
             
                                embed = discord.Embed(title=title,
         | 
| 503 | 
             
                                                      description=" ".join(wds)[:i + 1].replace(
         | 
| 504 | 
             
                                                          f"<|title|>{title}<|title|>", "").replace(f"<|image|>{imgp}<|image|>", ""), 
         | 
|  | |
| 516 | 
             
                                    )
         | 
| 517 |  | 
| 518 | 
             
                                e = await message.reply(embed=embed)
         | 
| 519 | 
            +
                                await asyncio.sleep(0.1)
         | 
| 520 | 
             
                        if imgp != "":
         | 
| 521 | 
             
                            np = """lowres, error, cropped, worst quality, low quality, ugly, duplicate, morbid, mutilated, out of frame, blurry, watermark, signature"""
         | 
| 522 | 
             
                            st = time.time()
         |