Set concurrency limit
Browse files
app.py
CHANGED
@@ -1,9 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
import asyncio
|
4 |
-
from concurrent.futures import ThreadPoolExecutor
|
5 |
-
|
6 |
-
executor = ThreadPoolExecutor()
|
7 |
|
8 |
model_pipeline = pipeline("text2text-generation", model="tribler/dsi-search-on-toy-dataset")
|
9 |
|
@@ -34,7 +31,8 @@ interface = gr.Interface(fn=process_query,
|
|
34 |
submit_btn="Find",
|
35 |
description="Search for movie trailers, music torrents, and bitcoin wallet addresses.",
|
36 |
article="This interface searches a toy dataset and returns a YouTube URL, magnet link, or Bitcoin wallet address. Generative AI is slowly starting to become capable of content discovery, relevance ranking, movie creation, financial transactions, market trading, and market matchmaking. The recent advent of end-to-end generative architectures might have disruptive effect on various industries. Social media platforms, movie industry, search engines, and financial intermediaries could *in principle* be replaced with fully decentralised alternatives (think Bitcoin and Bittorrent level decentralisation). This means a shift of power towards ordinary Internet citizens. See our De-DSI paper at EuroMLSys 2024 for scientific details. Please consider contributing and joining our community around the International Workshop on Distributed Infrastructure for Common Good.",
|
37 |
-
examples=[["spider man"], ["oceans 13"], ["sister starlight"], ["bitcoin address of xileno"]]
|
|
|
38 |
|
39 |
if __name__ == "__main__":
|
40 |
interface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
import asyncio
|
|
|
|
|
|
|
4 |
|
5 |
model_pipeline = pipeline("text2text-generation", model="tribler/dsi-search-on-toy-dataset")
|
6 |
|
|
|
31 |
submit_btn="Find",
|
32 |
description="Search for movie trailers, music torrents, and bitcoin wallet addresses.",
|
33 |
article="This interface searches a toy dataset and returns a YouTube URL, magnet link, or Bitcoin wallet address. Generative AI is slowly starting to become capable of content discovery, relevance ranking, movie creation, financial transactions, market trading, and market matchmaking. The recent advent of end-to-end generative architectures might have disruptive effect on various industries. Social media platforms, movie industry, search engines, and financial intermediaries could *in principle* be replaced with fully decentralised alternatives (think Bitcoin and Bittorrent level decentralisation). This means a shift of power towards ordinary Internet citizens. See our De-DSI paper at EuroMLSys 2024 for scientific details. Please consider contributing and joining our community around the International Workshop on Distributed Infrastructure for Common Good.",
|
34 |
+
examples=[["spider man"], ["oceans 13"], ["sister starlight"], ["bitcoin address of xileno"]],
|
35 |
+
concurrency_limit=50)
|
36 |
|
37 |
if __name__ == "__main__":
|
38 |
interface.launch()
|