Spaces:
Runtime error
Runtime error
Update app.py
Browse files61 unmodified lines6263646566676869707172737475767761 unmodified lines## /echo command to return the llm repsonse ##@bot.hybrid_command(name="cryptocoinsearch", description="Type /cryptocoinsearch and a cryptocurrency name or symbol for a detailed report NOTE: 2 or 3 mins")async def chat(ctx, prompt: str):if ctx.author.id == bot.user.id:returntry:# Acknowledge the command immediately - This is the discord message after the command / is called ##await ctx.send(f"Processing: {prompt}")loop = asyncio.get_running_loop()client = await loop.run_in_executor(None, get_client, None)job = client.submit(prompt, api_name="/predict") ## /predict can be used for gradio interface ##await wait(job)try:61 unmodified lines6263646566676869707172737475767778798081828361 unmodified lines## /echo command to return the llm repsonse ##@bot.hybrid_command(name="cryptocoinsearch", description="Type /cryptocoinsearch and a cryptocurrency name or symbol for a detailed report NOTE: 2 or 3 mins")async def chat(ctx, symbol: str, coin_name: str = None): # Add the optional parameter CoinNameif len(symbol) > 5:await ctx.send("The symbol should be at most 5 characters long.")returnif ctx.author.id == bot.user.id:returntry:# Acknowledge the command immediatelyif coin_name:await ctx.send(f"Processing: {symbol} with CoinName: {coin_name}")else:await ctx.send(f"Processing: {symbol}")loop = asyncio.get_running_loop()client = await loop.run_in_executor(None, get_client, None)job = client.submit(symbol, api_name="/predict")await wait(job)try:
app.py+10-4