Spaces:
Sleeping
Sleeping
Update templates/inference.html
Browse files- templates/inference.html +8 -2
templates/inference.html
CHANGED
|
@@ -30,10 +30,12 @@
|
|
| 30 |
<div class="mb-3">
|
| 31 |
<label for="modelSelect" class="form-label">Choose Model</label>
|
| 32 |
<select class="form-select" id="modelSelect">
|
| 33 |
-
<option value="
|
|
|
|
| 34 |
<option value="google/pegasus-xsum">google/pegasus-xsum</option>
|
| 35 |
<option value="sshleifer/distilbart-cnn-12-6">sshleifer/distilbart-cnn-12-6 (Faster)</option>
|
| 36 |
</select>
|
|
|
|
| 37 |
</div>
|
| 38 |
<div class="mb-3">
|
| 39 |
<label for="inputText" class="form-label">Text to Summarize</label>
|
|
@@ -79,7 +81,11 @@
|
|
| 79 |
const loader = document.getElementById('loader');
|
| 80 |
const resultContainer = document.getElementById('resultContainer');
|
| 81 |
const errorAlert = document.getElementById('errorAlert');
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
if (!text.trim()) {
|
| 84 |
alert("Please enter some text!");
|
| 85 |
return;
|
|
|
|
| 30 |
<div class="mb-3">
|
| 31 |
<label for="modelSelect" class="form-label">Choose Model</label>
|
| 32 |
<select class="form-select" id="modelSelect">
|
| 33 |
+
<option value="custom" selected>Custom</option>
|
| 34 |
+
<option value="facebook/bart-large-cnn">facebook/bart-large-cnn</option>
|
| 35 |
<option value="google/pegasus-xsum">google/pegasus-xsum</option>
|
| 36 |
<option value="sshleifer/distilbart-cnn-12-6">sshleifer/distilbart-cnn-12-6 (Faster)</option>
|
| 37 |
</select>
|
| 38 |
+
<input class="form-control" id="inputModel" rows="10" placeholder="custom HF model id user/model">
|
| 39 |
</div>
|
| 40 |
<div class="mb-3">
|
| 41 |
<label for="inputText" class="form-label">Text to Summarize</label>
|
|
|
|
| 81 |
const loader = document.getElementById('loader');
|
| 82 |
const resultContainer = document.getElementById('resultContainer');
|
| 83 |
const errorAlert = document.getElementById('errorAlert');
|
| 84 |
+
const inputModel = document.getElementById('inputModel');
|
| 85 |
+
|
| 86 |
+
if (model === 'Custom') {
|
| 87 |
+
model = inputModel;
|
| 88 |
+
}
|
| 89 |
if (!text.trim()) {
|
| 90 |
alert("Please enter some text!");
|
| 91 |
return;
|