Spaces:
Sleeping
Sleeping
Create index.html
Browse files- index.html +31 -0
index.html
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>File Translator</title>
|
| 7 |
+
</head>
|
| 8 |
+
<body>
|
| 9 |
+
<h2>Upload a File for Translation</h2>
|
| 10 |
+
|
| 11 |
+
{% if error_message %}
|
| 12 |
+
<p style="color: red;">{{ error_message }}</p>
|
| 13 |
+
{% endif %}
|
| 14 |
+
|
| 15 |
+
<form action="/" method="POST" enctype="multipart/form-data">
|
| 16 |
+
<input type="file" name="file" required>
|
| 17 |
+
<label for="target_language">Select Target Language:</label>
|
| 18 |
+
<select name="target_language">
|
| 19 |
+
{% for code, language in languages.items() %}
|
| 20 |
+
<option value="{{ code }}">{{ language }}</option>
|
| 21 |
+
{% endfor %}
|
| 22 |
+
</select>
|
| 23 |
+
<button type="submit">Translate</button>
|
| 24 |
+
</form>
|
| 25 |
+
|
| 26 |
+
{% if translated_text %}
|
| 27 |
+
<h3>Translated Text:</h3>
|
| 28 |
+
<p>{{ translated_text }}</p>
|
| 29 |
+
{% endif %}
|
| 30 |
+
</body>
|
| 31 |
+
</html>
|