Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,11 @@ import re
|
|
10 |
from collections import Counter
|
11 |
import spacy
|
12 |
import torch
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
# Load Spacy model for advanced NLP
|
15 |
try:
|
@@ -147,7 +152,7 @@ def hybrid_search(query, top_k=5):
|
|
147 |
result += f"Common Key Features: {', '.join(data['common_features'])}\n\n"
|
148 |
results.append(result)
|
149 |
|
150 |
-
return "\n.join(results)
|
151 |
|
152 |
# Create Gradio interface with additional input fields
|
153 |
iface = gr.Interface(
|
|
|
10 |
from collections import Counter
|
11 |
import spacy
|
12 |
import torch
|
13 |
+
from nltk.corpus import wordnet
|
14 |
+
import nltk
|
15 |
+
|
16 |
+
# Download WordNet data
|
17 |
+
nltk.download('wordnet')
|
18 |
|
19 |
# Load Spacy model for advanced NLP
|
20 |
try:
|
|
|
152 |
result += f"Common Key Features: {', '.join(data['common_features'])}\n\n"
|
153 |
results.append(result)
|
154 |
|
155 |
+
return "\n".join(results)
|
156 |
|
157 |
# Create Gradio interface with additional input fields
|
158 |
iface = gr.Interface(
|