pip dependencies
Browse files- app.py +0 -1
- requirements.txt +1 -0
app.py
CHANGED
@@ -6,7 +6,6 @@ model_pipeline = pipeline("text2text-generation", model="tribler/dsi-search-on-t
|
|
6 |
def process_query(query):
|
7 |
results = model_pipeline(query, max_length=60)
|
8 |
result_text = results[0]['generated_text'].strip()
|
9 |
-
print(result_text)
|
10 |
if result_text.startswith("http"):
|
11 |
youtube_id = result_text.split('watch?v=')[-1]
|
12 |
iframe = f'<iframe width="560" height="315" src="https://www.youtube.com/embed/{youtube_id}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'
|
|
|
6 |
def process_query(query):
|
7 |
results = model_pipeline(query, max_length=60)
|
8 |
result_text = results[0]['generated_text'].strip()
|
|
|
9 |
if result_text.startswith("http"):
|
10 |
youtube_id = result_text.split('watch?v=')[-1]
|
11 |
iframe = f'<iframe width="560" height="315" src="https://www.youtube.com/embed/{youtube_id}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
transformers
|