Spaces:
Build error
Build error
update readme
Browse files- README.md +1 -1
- app.py +2 -2
- translator.py +2 -1
README.md
CHANGED
|
@@ -20,7 +20,7 @@ The project is built in Python Which include API by FastAPI and User Interface b
|
|
| 20 |
### Environment Setup
|
| 21 |
1. Clone the repository:
|
| 22 |
```commandline
|
| 23 |
-
git clone git@
|
| 24 |
```
|
| 25 |
2. The project is require: Python 3.9+
|
| 26 |
3. Install dependencies by:
|
|
|
|
| 20 |
### Environment Setup
|
| 21 |
1. Clone the repository:
|
| 22 |
```commandline
|
| 23 |
+
git clone git@hf.co:spaces/myn0908/Language-Translation
|
| 24 |
```
|
| 25 |
2. The project is require: Python 3.9+
|
| 26 |
3. Install dependencies by:
|
app.py
CHANGED
|
@@ -36,7 +36,7 @@ def translate_text_text(input_text, input_dest_lang):
|
|
| 36 |
with gr.Blocks() as demo:
|
| 37 |
with gr.Column():
|
| 38 |
gr.Markdown("# Translator For Upload JSON file")
|
| 39 |
-
translated_text_json = gr.Textbox(label="
|
| 40 |
input_json = gr.File(label="Upload JSON file")
|
| 41 |
|
| 42 |
submit_json = gr.Button("Submit Json")
|
|
@@ -47,7 +47,7 @@ with gr.Blocks() as demo:
|
|
| 47 |
)
|
| 48 |
with gr.Column():
|
| 49 |
gr.Markdown("# Translator For Input Text and Destination Language")
|
| 50 |
-
translated_text_text = gr.Textbox(label="
|
| 51 |
input_dest_lang = gr.Textbox(placeholder='Example input: vi', label="Destination Language")
|
| 52 |
input_text = gr.Textbox(placeholder='Example inputs: I love you, I love you than myself',
|
| 53 |
label="Enter Text")
|
|
|
|
| 36 |
with gr.Blocks() as demo:
|
| 37 |
with gr.Column():
|
| 38 |
gr.Markdown("# Translator For Upload JSON file")
|
| 39 |
+
translated_text_json = gr.Textbox(label="Result Translate Text")
|
| 40 |
input_json = gr.File(label="Upload JSON file")
|
| 41 |
|
| 42 |
submit_json = gr.Button("Submit Json")
|
|
|
|
| 47 |
)
|
| 48 |
with gr.Column():
|
| 49 |
gr.Markdown("# Translator For Input Text and Destination Language")
|
| 50 |
+
translated_text_text = gr.Textbox(label="Result Translate Text")
|
| 51 |
input_dest_lang = gr.Textbox(placeholder='Example input: vi', label="Destination Language")
|
| 52 |
input_text = gr.Textbox(placeholder='Example inputs: I love you, I love you than myself',
|
| 53 |
label="Enter Text")
|
translator.py
CHANGED
|
@@ -154,6 +154,7 @@ class ServerTranslator:
|
|
| 154 |
return cls(open_ai=model, inputs_data=input_data)
|
| 155 |
|
| 156 |
|
| 157 |
-
|
|
|
|
| 158 |
# process = LocalTranslator.language_translator()
|
| 159 |
# process.translate()
|
|
|
|
| 154 |
return cls(open_ai=model, inputs_data=input_data)
|
| 155 |
|
| 156 |
|
| 157 |
+
if __name__ == "__main__":
|
| 158 |
+
pass
|
| 159 |
# process = LocalTranslator.language_translator()
|
| 160 |
# process.translate()
|