Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,8 +3,7 @@ import gradio as gr
|
|
| 3 |
import subprocess
|
| 4 |
|
| 5 |
subprocess.check_call(["pip", "install", "transformers"])
|
| 6 |
-
subprocess.check_call(["pip", "install", "
|
| 7 |
-
subprocess.check_call(["pip", "install", "tf-keras"])
|
| 8 |
|
| 9 |
|
| 10 |
from transformers import pipeline
|
|
@@ -14,7 +13,7 @@ summariser = pipeline("text2text-generation", model="balaramas/mbart-enhiriser")
|
|
| 14 |
|
| 15 |
def summarise(Input):
|
| 16 |
|
| 17 |
-
res = summariser(Input)
|
| 18 |
return res
|
| 19 |
|
| 20 |
description = """
|
|
|
|
| 3 |
import subprocess
|
| 4 |
|
| 5 |
subprocess.check_call(["pip", "install", "transformers"])
|
| 6 |
+
subprocess.check_call(["pip", "install", "torch"])
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
from transformers import pipeline
|
|
|
|
| 13 |
|
| 14 |
def summarise(Input):
|
| 15 |
|
| 16 |
+
res = summariser(Input)[0]['generated_text']
|
| 17 |
return res
|
| 18 |
|
| 19 |
description = """
|