Update README.md
Browse files
README.md
CHANGED
|
@@ -291,6 +291,40 @@ An inverse trend can be observed, with SLIMER emerging as the most effective in
|
|
| 291 |
</body>
|
| 292 |
</html>
|
| 293 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 294 |
```python
|
| 295 |
from vllm import LLM, SamplingParams
|
| 296 |
|
|
|
|
| 291 |
</body>
|
| 292 |
</html>
|
| 293 |
|
| 294 |
+
<!DOCTYPE html>
|
| 295 |
+
<html>
|
| 296 |
+
<head>
|
| 297 |
+
<title>Hugging Face Model Interface</title>
|
| 298 |
+
</head>
|
| 299 |
+
<body>
|
| 300 |
+
<h1>Hugging Face Model Interface</h1>
|
| 301 |
+
<textarea id="inputText" rows="10" cols="50" placeholder="Paste your string with escape characters here..."></textarea>
|
| 302 |
+
<br>
|
| 303 |
+
<button onclick="processText()">Submit</button>
|
| 304 |
+
<p id="processedText"></p>
|
| 305 |
+
|
| 306 |
+
<script>
|
| 307 |
+
function processText() {
|
| 308 |
+
// Get the value from the textarea
|
| 309 |
+
let inputText = document.getElementById("inputText").value;
|
| 310 |
+
|
| 311 |
+
// Replace escape characters with their corresponding symbols
|
| 312 |
+
inputText = inputText.replace(/\\n/g, "\n");
|
| 313 |
+
inputText = inputText.replace(/\\t/g, "\t");
|
| 314 |
+
inputText = inputText.replace(/\\r/g, "\r");
|
| 315 |
+
|
| 316 |
+
// Display the processed text
|
| 317 |
+
document.getElementById("processedText").innerText = inputText;
|
| 318 |
+
|
| 319 |
+
// Here, you can also send the processed text to your Hugging Face model
|
| 320 |
+
// For example, using fetch to send a POST request to your model API
|
| 321 |
+
}
|
| 322 |
+
</script>
|
| 323 |
+
</body>
|
| 324 |
+
</html>
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
|
| 328 |
```python
|
| 329 |
from vllm import LLM, SamplingParams
|
| 330 |
|