Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,6 +46,11 @@ class SemanticSearch:
|
|
| 46 |
embeddings = np.vstack(embeddings)
|
| 47 |
return embeddings
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
def load_recommender(paths, start_page=1):
|
| 51 |
global recommender
|
|
@@ -165,5 +170,6 @@ with gr.Blocks() as demo:
|
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
-
demo.launch()
|
|
|
|
| 169 |
|
|
|
|
| 46 |
embeddings = np.vstack(embeddings)
|
| 47 |
return embeddings
|
| 48 |
|
| 49 |
+
def unique_filename(basename):
|
| 50 |
+
# Append a unique ID to the end of the filename, before the extension
|
| 51 |
+
base, ext = os.path.splitext(basename)
|
| 52 |
+
return base + "_" + uuid.uuid4().hex + ext
|
| 53 |
+
|
| 54 |
|
| 55 |
def load_recommender(paths, start_page=1):
|
| 56 |
global recommender
|
|
|
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
+
demo.launch(share=True, debug=True, auth=None, auth_message=None)
|
| 174 |
+
|
| 175 |
|