Spaces:
Runtime error
Runtime error
lukecurtin32
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -143,7 +143,19 @@ iface = gr.Interface(
|
|
143 |
title="English to Spanish Translator",
|
144 |
description="Enter English text to translate it into Spanish, with accurate translation of construction and project management terms."
|
145 |
)
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
# Launch the interface
|
149 |
if __name__ == "__main__":
|
|
|
143 |
title="English to Spanish Translator",
|
144 |
description="Enter English text to translate it into Spanish, with accurate translation of construction and project management terms."
|
145 |
)
|
146 |
+
import os
|
147 |
+
import subprocess
|
148 |
+
|
149 |
+
# Install the transformers library if not already installed
|
150 |
+
try:
|
151 |
+
import transformers
|
152 |
+
except ImportError:
|
153 |
+
subprocess.check_call([sys.executable, "-m", "pip", "install", "transformers"])
|
154 |
+
import transformers
|
155 |
+
|
156 |
+
from transformers import pipeline
|
157 |
+
import gradio as gr
|
158 |
+
import re
|
159 |
|
160 |
# Launch the interface
|
161 |
if __name__ == "__main__":
|