CryptoScoutv1 commited on
Commit
ef043bc
·
verified ·
1 Parent(s): 3404d7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -24,7 +24,7 @@ async def wait(job):
24
 
25
 
26
  def get_client(session: Optional[str] = None) -> grc.Client:
27
- client = grc.Client("https://freddyaboulton-echo-chatbot.hf.space", hf_token=os.getenv("HF_TOKEN"))
28
  if session:
29
  client.session_hash = session
30
  return client
@@ -64,8 +64,8 @@ thread_to_user = {}
64
 
65
 
66
  @bot.hybrid_command(
67
- name="echo",
68
- description="Enter some text to chat with the bot! Like this: /echo Hello, how are you?",
69
  )
70
  async def chat(ctx, prompt: str):
71
  if ctx.author.id == bot.user.id:
@@ -82,7 +82,7 @@ async def chat(ctx, prompt: str):
82
  thread = await message.create_thread(name=prompt)
83
  loop = asyncio.get_running_loop()
84
  client = await loop.run_in_executor(None, get_client, None)
85
- job = client.submit(prompt, api_name="/chat")
86
  await wait(job)
87
 
88
  try:
@@ -202,7 +202,7 @@ else:
202
  with gr.Blocks() as demo:
203
  gr.Markdown(
204
  f"""
205
- # Discord bot of https://freddyaboulton-echo-chatbot.hf.space
206
  {welcome_message}
207
  """
208
  )
 
24
 
25
 
26
  def get_client(session: Optional[str] = None) -> grc.Client:
27
+ client = grc.Client("https://cryptoscoutv1-discord-chatbot-cs-pmv2.hf.space", hf_token=os.getenv("HF_TOKEN"))
28
  if session:
29
  client.session_hash = session
30
  return client
 
64
 
65
 
66
  @bot.hybrid_command(
67
+ name="cryptoadvisor",
68
+ description="Enter a Cryptocurrency symbol or name for a investment plan. NOTE: Output takes about 2 minutes",
69
  )
70
  async def chat(ctx, prompt: str):
71
  if ctx.author.id == bot.user.id:
 
82
  thread = await message.create_thread(name=prompt)
83
  loop = asyncio.get_running_loop()
84
  client = await loop.run_in_executor(None, get_client, None)
85
+ job = client.submit(prompt, api_name="/predict")
86
  await wait(job)
87
 
88
  try:
 
202
  with gr.Blocks() as demo:
203
  gr.Markdown(
204
  f"""
205
+ # Discord bot of crewai crypto investment guidance
206
  {welcome_message}
207
  """
208
  )