Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ async def wait(job):
|
|
| 23 |
|
| 24 |
## GRADIO UI API LINK ##
|
| 25 |
def get_client(session: Optional[str] = None) -> grc.Client:
|
| 26 |
-
client = grc.Client("https://cryptoscoutv1-
|
| 27 |
if session:
|
| 28 |
client.session_hash = session
|
| 29 |
return client
|
|
@@ -61,7 +61,7 @@ thread_to_user = {}
|
|
| 61 |
|
| 62 |
## /echo command to return the llm repsonse ##
|
| 63 |
|
| 64 |
-
@bot.hybrid_command(name="cryptocoinsearch", description="Type /cryptocoinsearch
|
| 65 |
async def chat(ctx, symbol: str, coin_name: str = None): # Add the optional parameter CoinName
|
| 66 |
if len(symbol) > 5:
|
| 67 |
await ctx.send("The symbol should be at most 5 characters long.")
|
|
|
|
| 23 |
|
| 24 |
## GRADIO UI API LINK ##
|
| 25 |
def get_client(session: Optional[str] = None) -> grc.Client:
|
| 26 |
+
client = grc.Client("https://cryptoscoutv1-discord-chatbot-cs-test.hf.space/", hf_token=os.getenv("HF_TOKEN"))
|
| 27 |
if session:
|
| 28 |
client.session_hash = session
|
| 29 |
return client
|
|
|
|
| 61 |
|
| 62 |
## /echo command to return the llm repsonse ##
|
| 63 |
|
| 64 |
+
@bot.hybrid_command(name="cryptocoinsearch", description="Type /cryptocoinsearch with the cryptocurrency TICKER or SYMBOL for a detailed report NOTE: 2 or 3 mins")
|
| 65 |
async def chat(ctx, symbol: str, coin_name: str = None): # Add the optional parameter CoinName
|
| 66 |
if len(symbol) > 5:
|
| 67 |
await ctx.send("The symbol should be at most 5 characters long.")
|