Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,8 @@ from transformers import pipeline
|
|
3 |
|
4 |
pipeline = pipeline(task="translation", model="bigscience/bloom-350m")
|
5 |
|
6 |
-
def
|
7 |
-
predictions = pipeline(
|
8 |
return {p["label"]: p["score"] for p in predictions}
|
9 |
|
10 |
gr.Interface(
|
|
|
3 |
|
4 |
pipeline = pipeline(task="translation", model="bigscience/bloom-350m")
|
5 |
|
6 |
+
def translate(text):
|
7 |
+
predictions = pipeline(text)
|
8 |
return {p["label"]: p["score"] for p in predictions}
|
9 |
|
10 |
gr.Interface(
|