Spaces:
Runtime error
Runtime error
lunarflu commited on
Commit ·
1aa00a4
1
Parent(s): f690a7d
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,8 +4,6 @@ import os
|
|
| 4 |
import threading
|
| 5 |
from threading import Event
|
| 6 |
|
| 7 |
-
# test
|
| 8 |
-
|
| 9 |
import discord
|
| 10 |
import gradio as gr
|
| 11 |
from discord.ext import commands
|
|
@@ -64,8 +62,6 @@ async def try_codellama(ctx, prompt):
|
|
| 64 |
loop = asyncio.get_running_loop()
|
| 65 |
output_code = await loop.run_in_executor(None, codellama_initial_generation, prompt, thread)
|
| 66 |
codellama_threadid_userid_dictionary[thread.id] = ctx.author.id
|
| 67 |
-
|
| 68 |
-
print(output_code)
|
| 69 |
await thread.send(output_code)
|
| 70 |
except Exception as e:
|
| 71 |
print(f"Error: {e}")
|
|
@@ -188,4 +184,4 @@ with gr.Blocks() as demo:
|
|
| 188 |
{welcome_message}
|
| 189 |
""")
|
| 190 |
|
| 191 |
-
demo.launch()
|
|
|
|
| 4 |
import threading
|
| 5 |
from threading import Event
|
| 6 |
|
|
|
|
|
|
|
| 7 |
import discord
|
| 8 |
import gradio as gr
|
| 9 |
from discord.ext import commands
|
|
|
|
| 62 |
loop = asyncio.get_running_loop()
|
| 63 |
output_code = await loop.run_in_executor(None, codellama_initial_generation, prompt, thread)
|
| 64 |
codellama_threadid_userid_dictionary[thread.id] = ctx.author.id
|
|
|
|
|
|
|
| 65 |
await thread.send(output_code)
|
| 66 |
except Exception as e:
|
| 67 |
print(f"Error: {e}")
|
|
|
|
| 184 |
{welcome_message}
|
| 185 |
""")
|
| 186 |
|
| 187 |
+
demo.launch()
|