Nick088 commited on
Commit
c714f1d
·
verified ·
1 Parent(s): f9413a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -93,11 +93,9 @@ async def display_stats(message: discord.Message):
93
 
94
 
95
  async def load_space(guild: discord.Guild, message: discord.Message, content: str):
96
- iframe_url = (
97
- requests.get(f"https://huggingface.co/api/spaces/{content}/host")
98
- .json()
99
- .get("host")
100
- )
101
  if iframe_url is None:
102
  return await message.channel.send(
103
  f"Space: {content} not found. If you'd like to make a prediction, enclose the inputs in quotation marks."
 
93
 
94
 
95
  async def load_space(guild: discord.Guild, message: discord.Message, content: str):
96
+ response = requests.get(f"https://huggingface.co/api/spaces/{content}/host")
97
+ print(response.json())
98
+ iframe_url = response.json().get("host")
 
 
99
  if iframe_url is None:
100
  return await message.channel.send(
101
  f"Space: {content} not found. If you'd like to make a prediction, enclose the inputs in quotation marks."