Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,9 +45,9 @@ def get_movies(message, history):
|
|
| 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 |
-
for i in range(len(
|
| 49 |
time.sleep(0.05)
|
| 50 |
-
yield "Found: " + "\n\n" +
|
| 51 |
except:
|
| 52 |
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"
|
| 53 |
|
|
|
|
| 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 |
+
for i in range(len(print_llm_text)):
|
| 49 |
time.sleep(0.05)
|
| 50 |
+
yield "Found: " + "\n\n" + print_llm_text[: i+1]
|
| 51 |
except:
|
| 52 |
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"
|
| 53 |
|