Spaces:
Running
Running
Eric Mitchell
commited on
Commit
·
321f098
1
Parent(s):
4a90a06
Update user agent.
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def update_text(t, n):
|
|
49 |
|
50 |
|
51 |
def detect(text):
|
52 |
-
headers = {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'User-Agent': '
|
53 |
x = requests.post(GET_RESULT, data={'text': text}, headers=headers).json()
|
54 |
response = x['result']
|
55 |
status = x['status']
|
|
|
49 |
|
50 |
|
51 |
def detect(text):
|
52 |
+
headers = {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'User-Agent': 'HF_SPACES'}
|
53 |
x = requests.post(GET_RESULT, data={'text': text}, headers=headers).json()
|
54 |
response = x['result']
|
55 |
status = x['status']
|