satpalsr commited on
Commit
e83eb5c
·
1 Parent(s): 87f7efc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -2,11 +2,10 @@ import gradio as gr
2
  import os
3
 
4
  def get_msg(name, request: gr.Request):
5
- trueorigin = str(os.environ["ORIGIN"])
6
- actualorigin = request.headers
7
- if actualorigin == trueorigin:
8
  return "Working"
9
- return "Hello " + name + "!" + str(actualorigin)
10
 
11
  with gr.Blocks() as demo:
12
 
 
2
  import os
3
 
4
  def get_msg(name, request: gr.Request):
5
+ header_origin = str(request.headers['origin'])
6
+ if header_origin == str(os.environ["ORIGIN"]):
 
7
  return "Working"
8
+ return "Hello " + name + "!" + str(header_origin)
9
 
10
  with gr.Blocks() as demo:
11