Spaces:
Runtime error
Runtime error
Update ✨Entity Linking Application✨.py
Browse files
✨Entity Linking Application✨.py
CHANGED
|
@@ -89,7 +89,6 @@ async def mains(name, single, combi):
|
|
| 89 |
s = search(url, num_results = 30, lang="en")
|
| 90 |
for i in s:
|
| 91 |
data.add(i.split("/")[-1])
|
| 92 |
-
print(i)
|
| 93 |
|
| 94 |
wikipedia_url = f"https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch={name}&srlimit=1&srprop=&srenablerewrites=True&srinfo=suggestion&format=json"
|
| 95 |
json_data = await fetch_json(wikipedia_url, session)
|
|
@@ -438,6 +437,7 @@ def main_cli():
|
|
| 438 |
desc_emb = model.encode([description])
|
| 439 |
|
| 440 |
lista.append({link: [label_emb, desc_emb]})
|
|
|
|
| 441 |
|
| 442 |
label_dataset_emb = model.encode([i])
|
| 443 |
desc_dataset_emb = model.encode([j])
|
|
|
|
| 89 |
s = search(url, num_results = 30, lang="en")
|
| 90 |
for i in s:
|
| 91 |
data.add(i.split("/")[-1])
|
|
|
|
| 92 |
|
| 93 |
wikipedia_url = f"https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch={name}&srlimit=1&srprop=&srenablerewrites=True&srinfo=suggestion&format=json"
|
| 94 |
json_data = await fetch_json(wikipedia_url, session)
|
|
|
|
| 437 |
desc_emb = model.encode([description])
|
| 438 |
|
| 439 |
lista.append({link: [label_emb, desc_emb]})
|
| 440 |
+
print(qid)
|
| 441 |
|
| 442 |
label_dataset_emb = model.encode([i])
|
| 443 |
desc_dataset_emb = model.encode([j])
|