Spaces:
Runtime error
Runtime error
Commit
•
b8e2295
1
Parent(s):
7fb79d9
Update app.py
Browse files
app.py
CHANGED
@@ -51,6 +51,7 @@ def TopicClassification(payload: TextIn):
|
|
51 |
# https://hinacortus-api-knowyouraudience.hf.space/whichsocial/myspace
|
52 |
@app.get("/whichsocial/{request}")
|
53 |
def whichsocial(request):
|
|
|
54 |
if ('http' in request or 'https' in request or 'www' in request or '.com' in request or '.fr' in request):
|
55 |
website = "ok"
|
56 |
listsocialnetwork = ['facebook', 'youtube', 'myspace', 'linkedin', 'twitter', 'instagram', 'github',
|
@@ -61,8 +62,6 @@ def whichsocial(request):
|
|
61 |
print(socialnetwork, part)
|
62 |
if socialnetwork == request:
|
63 |
socialnetwork = socialnetwork
|
64 |
-
else:
|
65 |
-
socialnetwork = "not found"
|
66 |
else:
|
67 |
website = "it's not a website link !"
|
68 |
userprofile = 'me'
|
|
|
51 |
# https://hinacortus-api-knowyouraudience.hf.space/whichsocial/myspace
|
52 |
@app.get("/whichsocial/{request}")
|
53 |
def whichsocial(request):
|
54 |
+
socialnetwork = "not found"
|
55 |
if ('http' in request or 'https' in request or 'www' in request or '.com' in request or '.fr' in request):
|
56 |
website = "ok"
|
57 |
listsocialnetwork = ['facebook', 'youtube', 'myspace', 'linkedin', 'twitter', 'instagram', 'github',
|
|
|
62 |
print(socialnetwork, part)
|
63 |
if socialnetwork == request:
|
64 |
socialnetwork = socialnetwork
|
|
|
|
|
65 |
else:
|
66 |
website = "it's not a website link !"
|
67 |
userprofile = 'me'
|