cv
Browse files- app.py +2 -0
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -10,6 +10,7 @@ and playable instead of buried in a bullet point.
|
|
| 10 |
|
| 11 |
import gradio as gr
|
| 12 |
import numpy as np
|
|
|
|
| 13 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
| 14 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 15 |
|
|
@@ -57,6 +58,7 @@ def retrieve(query: str, top_k: int = 3):
|
|
| 57 |
return results
|
| 58 |
|
| 59 |
|
|
|
|
| 60 |
def ask_the_cv(query, history):
|
| 61 |
history = history or []
|
| 62 |
results = retrieve(query)
|
|
|
|
| 10 |
|
| 11 |
import gradio as gr
|
| 12 |
import numpy as np
|
| 13 |
+
import spaces
|
| 14 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
| 15 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 16 |
|
|
|
|
| 58 |
return results
|
| 59 |
|
| 60 |
|
| 61 |
+
@spaces.GPU
|
| 62 |
def ask_the_cv(query, history):
|
| 63 |
history = history or []
|
| 64 |
results = retrieve(query)
|
requirements.txt
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
gradio==6.20.0
|
|
|
|
| 2 |
scikit-learn>=1.3
|
| 3 |
numpy>=1.24
|
|
|
|
| 1 |
gradio==6.20.0
|
| 2 |
+
spaces
|
| 3 |
scikit-learn>=1.3
|
| 4 |
numpy>=1.24
|