Spaces:
Sleeping
Sleeping
Commit ·
4612327
1
Parent(s): 0f60aab
updating requirements
Browse files- app.py +1 -4
- requirements.txt +3 -0
app.py
CHANGED
|
@@ -7,9 +7,6 @@ import os
|
|
| 7 |
load_dotenv()
|
| 8 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 9 |
|
| 10 |
-
# Debug: Print the HF_TOKEN to verify
|
| 11 |
-
print(f"Extracted HF_TOKEN: {HF_TOKEN}")
|
| 12 |
-
|
| 13 |
model_name = "Helsinki-NLP/opus-mt-en-nso"
|
| 14 |
API_URL = f"https://api-inference.huggingface.co/models/{model_name}"
|
| 15 |
headers = {"Authorization": f"Bearer {HF_TOKEN}"}
|
|
@@ -34,7 +31,7 @@ translator = gr.Interface(
|
|
| 34 |
fn=translate,
|
| 35 |
inputs=[gr.Textbox(label="Input Text", placeholder="Input Text To Be Translated")],
|
| 36 |
outputs=gr.Textbox(label="Translation"),
|
| 37 |
-
title="
|
| 38 |
)
|
| 39 |
|
| 40 |
translator.launch()
|
|
|
|
| 7 |
load_dotenv()
|
| 8 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 9 |
|
|
|
|
|
|
|
|
|
|
| 10 |
model_name = "Helsinki-NLP/opus-mt-en-nso"
|
| 11 |
API_URL = f"https://api-inference.huggingface.co/models/{model_name}"
|
| 12 |
headers = {"Authorization": f"Bearer {HF_TOKEN}"}
|
|
|
|
| 31 |
fn=translate,
|
| 32 |
inputs=[gr.Textbox(label="Input Text", placeholder="Input Text To Be Translated")],
|
| 33 |
outputs=gr.Textbox(label="Translation"),
|
| 34 |
+
title="Translademia",
|
| 35 |
)
|
| 36 |
|
| 37 |
translator.launch()
|
requirements.txt
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio
|
| 2 |
+
requests
|
| 3 |
+
python-dotenv
|