Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,9 +2,11 @@ import gradio as gr
|
|
| 2 |
from transformers import pipeline
|
| 3 |
from langdetect import detect
|
| 4 |
|
| 5 |
-
# Model valid și public
|
| 6 |
summarizer = pipeline("summarization", model="csebuetnlp/mT5_multilingual_XLSum")
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
|
| 9 |
def rezuma_text(text, lungime):
|
| 10 |
lang = detect(text)
|
|
@@ -40,4 +42,3 @@ gr.Interface(
|
|
| 40 |
"""
|
| 41 |
).launch()
|
| 42 |
|
| 43 |
-
|
|
|
|
| 2 |
from transformers import pipeline
|
| 3 |
from langdetect import detect
|
| 4 |
|
| 5 |
+
# Model de rezumare valid și public
|
| 6 |
summarizer = pipeline("summarization", model="csebuetnlp/mT5_multilingual_XLSum")
|
| 7 |
+
|
| 8 |
+
# Model de traducere valid pentru română → engleză
|
| 9 |
+
translator = pipeline("translation", model="Helsinki-NLP/opus-mt-ROMANCE-en")
|
| 10 |
|
| 11 |
def rezuma_text(text, lungime):
|
| 12 |
lang = detect(text)
|
|
|
|
| 42 |
"""
|
| 43 |
).launch()
|
| 44 |
|
|
|