Jofthomas HF staff commited on
Commit
0bde9db
1 Parent(s): ee795ac

Blocking other sources/spaces from requesting

Browse files
Files changed (1) hide show
  1. TextGen/router.py +1 -1
TextGen/router.py CHANGED
@@ -263,7 +263,7 @@ async def generate_wav(message: VoiceMessage):
263
 
264
  @app.get("/generate_voice_eleven", response_class=StreamingResponse)
265
  @app.post("/generate_voice_eleven", response_class=StreamingResponse)
266
- def generate_voice_eleven(message: VoiceMessage = None,request: Request):
267
  if request.headers.get("origin") != "https://jofthomas-everchanging-quest.static.hf.space":
268
  return
269
  global Last_message # Declare Last_message as global
 
263
 
264
  @app.get("/generate_voice_eleven", response_class=StreamingResponse)
265
  @app.post("/generate_voice_eleven", response_class=StreamingResponse)
266
+ def generate_voice_eleven(request: Request, message: VoiceMessage = None):
267
  if request.headers.get("origin") != "https://jofthomas-everchanging-quest.static.hf.space":
268
  return
269
  global Last_message # Declare Last_message as global