Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
|
|
|
| 3 |
from datasets import load_dataset, concatenate_datasets
|
| 4 |
from langchain.docstore.document import Document
|
| 5 |
from langchain.vectorstores import FAISS
|
|
@@ -96,7 +97,7 @@ def translate_ru_uz(message: str) -> str:
|
|
| 96 |
)
|
| 97 |
return response.content
|
| 98 |
|
| 99 |
-
|
| 100 |
def retrieve_articles(query, language):
|
| 101 |
"""
|
| 102 |
Если выбран язык "Russian", переводит запрос с русского на узбекский.
|
|
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
+
import spaces
|
| 4 |
from datasets import load_dataset, concatenate_datasets
|
| 5 |
from langchain.docstore.document import Document
|
| 6 |
from langchain.vectorstores import FAISS
|
|
|
|
| 97 |
)
|
| 98 |
return response.content
|
| 99 |
|
| 100 |
+
@spaces.GPU
|
| 101 |
def retrieve_articles(query, language):
|
| 102 |
"""
|
| 103 |
Если выбран язык "Russian", переводит запрос с русского на узбекский.
|