Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,11 +44,11 @@ def get_movies(message, history):
|
|
| 44 |
for movie in movies:
|
| 45 |
retrun_text = retrun_text + 'Title : ' + movie.metadata['title'] + '\n------------\n' + 'Plot: ' + movie.page_content + '\n\n'
|
| 46 |
|
| 47 |
-
|
| 48 |
-
print(print_llm_text)
|
| 49 |
-
for i in range(len(
|
| 50 |
time.sleep(0.05)
|
| 51 |
-
yield "Found: " + "\n\n" +
|
| 52 |
# except:
|
| 53 |
# yield "Please clone the repo and add your open ai key as well as your MongoDB Atlas UR in the Secret Section of you Space\n OPENAI_API_KEY (your Open AI key) and MONGODB_ATLAS_CLUSTER_URI (0.0.0.0/0 whitelisted instance with Vector index created) \n\n For more information : https://mongodb.com/products/platform/atlas-vector-search"
|
| 54 |
|
|
|
|
| 44 |
for movie in movies:
|
| 45 |
retrun_text = retrun_text + 'Title : ' + movie.metadata['title'] + '\n------------\n' + 'Plot: ' + movie.page_content + '\n\n'
|
| 46 |
|
| 47 |
+
# print_llm_text = chain.invoke({"input": retrun_text})
|
| 48 |
+
#print(print_llm_text)
|
| 49 |
+
for i in range(len(retrun_text)):
|
| 50 |
time.sleep(0.05)
|
| 51 |
+
yield "Found: " + "\n\n" + retrun_text[: i+1]
|
| 52 |
# except:
|
| 53 |
# yield "Please clone the repo and add your open ai key as well as your MongoDB Atlas UR in the Secret Section of you Space\n OPENAI_API_KEY (your Open AI key) and MONGODB_ATLAS_CLUSTER_URI (0.0.0.0/0 whitelisted instance with Vector index created) \n\n For more information : https://mongodb.com/products/platform/atlas-vector-search"
|
| 54 |
|