Spaces:
Runtime error
Runtime error
Update templates/index.html
Browse files- templates/index.html +17 -14
templates/index.html
CHANGED
|
@@ -1,37 +1,40 @@
|
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
<head>
|
| 4 |
-
<title>Multimodal
|
| 5 |
</head>
|
| 6 |
<body>
|
| 7 |
-
<h1>
|
| 8 |
<form method="POST" enctype="multipart/form-data">
|
| 9 |
-
<label>
|
| 10 |
<input type="text" name="user_input"><br><br>
|
| 11 |
|
| 12 |
-
<label>Upload PDF:</label>
|
| 13 |
<input type="file" name="uploaded_pdf" multiple><br><br>
|
| 14 |
|
| 15 |
-
<label>Upload Image:</label>
|
| 16 |
<input type="file" name="uploaded_image"><br><br>
|
| 17 |
|
| 18 |
-
<label>Upload Audio:</label>
|
| 19 |
<input type="file" name="uploaded_audio"><br><br>
|
| 20 |
|
| 21 |
-
<label>PDF Chat:</label>
|
| 22 |
<input type="checkbox" name="pdf_chat"><br><br>
|
| 23 |
|
| 24 |
-
<
|
| 25 |
</form>
|
| 26 |
|
| 27 |
{% if response %}
|
| 28 |
-
<
|
| 29 |
<p>{{ response }}</p>
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
|
| 35 |
{% endif %}
|
| 36 |
</body>
|
| 37 |
</html>
|
|
|
|
| 1 |
+
<!-- templates/index.html -->
|
| 2 |
<!DOCTYPE html>
|
| 3 |
<html>
|
| 4 |
<head>
|
| 5 |
+
<title>Multimodal Chatbot</title>
|
| 6 |
</head>
|
| 7 |
<body>
|
| 8 |
+
<h1>Chat with LLM</h1>
|
| 9 |
<form method="POST" enctype="multipart/form-data">
|
| 10 |
+
<label>Enter message:</label><br>
|
| 11 |
<input type="text" name="user_input"><br><br>
|
| 12 |
|
| 13 |
+
<label>Upload PDF(s):</label><br>
|
| 14 |
<input type="file" name="uploaded_pdf" multiple><br><br>
|
| 15 |
|
| 16 |
+
<label>Upload Image:</label><br>
|
| 17 |
<input type="file" name="uploaded_image"><br><br>
|
| 18 |
|
| 19 |
+
<label>Upload Audio:</label><br>
|
| 20 |
<input type="file" name="uploaded_audio"><br><br>
|
| 21 |
|
| 22 |
+
<label>Enable PDF Chat:</label>
|
| 23 |
<input type="checkbox" name="pdf_chat"><br><br>
|
| 24 |
|
| 25 |
+
<input type="submit" value="Send">
|
| 26 |
</form>
|
| 27 |
|
| 28 |
{% if response %}
|
| 29 |
+
<h2>Response:</h2>
|
| 30 |
<p>{{ response }}</p>
|
| 31 |
+
{% endif %}
|
| 32 |
+
|
| 33 |
+
{% if audio_path %}
|
| 34 |
+
<h2>Audio:</h2>
|
| 35 |
+
<audio controls>
|
| 36 |
+
<source src="{{ url_for('audio') }}?path={{ audio_path }}" type="audio/mp3">
|
| 37 |
+
</audio>
|
| 38 |
{% endif %}
|
| 39 |
</body>
|
| 40 |
</html>
|