Spaces:
Runtime error
Runtime error
File size: 6,724 Bytes
b70e333 f8a80df 3d87804 f8a80df 61bba9c febf1a1 61bba9c febf1a1 61bba9c febf1a1 5c74d30 febf1a1 3c13c0a 595cd98 3c13c0a 595cd98 3c13c0a febf1a1 f8a80df b70e333 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
<main>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Text Generation Form</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<main>
<div id="loading-overlay">
<div class="loader"></div>
</div>
<section id="text-gen">
<h2>Text generation using code-llama-7b-databases-finetuned</h2>
<p>
Model:
<a
href="https://huggingface.co/stefutz101/code-llama-7b-databases-finetuned2"
rel="noreferrer"
target="_blank"
>code-llama-7b-databases-finetuned2
</a>
</p>
<p>
Dataset:
<a
href="https://huggingface.co/datasets/stefutz101/db_course-synthetic_text_to_sql_dataset"
rel="noreferrer"
target="_blank"
>db_course-synthetic_text_to_sql_dataset
</a>
</p>
<form class="text-gen-form">
<div class="mode-fields">
<label for="mode-select">Select Mode</label>
<select id="mode-select" onchange="updateForm()">
<option value="sql">SQL</option>
<option value="text">Text</option>
<option value="file">File</option>
</select>
</div>
<div id="sql-fields" class="mode-fields">
<div class="mode-fields">
<label for="sql-context">Context</label>
<textarea id="sql-context"></textarea>
</div>
<div class="mode-fields">
<label for="sql-prompt">Text prompt</label>
<textarea id="sql-prompt"></textarea>
</div>
</div>
<div id="text-fields" class="mode-fields" style="display: none;">
<textarea id="text-context" style="display: none;">Provide an answer to the following question:</textarea>
<label for="text-prompt">Text prompt</label>
<input id="text-prompt" type="text" />
</div>
<div id="file-fields" class="mode-fields" style="display: none;">
<label for="file-input">Upload File</label>
<input id="file-input" type="file" accept=".json" />
</div>
<div class="advanced-settings" id="advanced-settings">
<p style="color: red; font-weight: bold; text-align: center;">
Warning!! Do not change these settings if you don't know what you are doing!
</p>
<div class="mode-fields">
<input id="tokenize" type="checkbox" />
<label for="tokenize">Tokenize</label>
</div>
<div class="mode-fields">
<input id="add-generation-prompt" type="checkbox" checked />
<label for="add-generation-prompt">Add Generation Prompt</label>
</div>
<div class="mode-fields">
<label for="max-new-tokens">Max New Tokens</label>
<div class="range-container">
<input id="max-new-tokens" type="range" min="0" max="512" step="1" value="256" oninput="this.nextElementSibling.value = this.value"/>
<output>256</output>
</div>
</div>
<div class="mode-fields">
<input id="do-sample" type="checkbox" checked />
<label for="do-sample">Do Sample</label>
</div>
<div class="mode-fields">
<label for="temperature">Temperature</label>
<div class="range-container">
<input id="temperature" type="range" min="0.1" max="1.0" step="0.1" value="0.7" oninput="this.nextElementSibling.value = this.value"/>
<output>0.7</output>
</div>
</div>
<div class="mode-fields">
<label for="top-k">Top K</label>
<div class="range-container">
<input id="top-k" type="range" min="1" max="100" step="1" value="50" oninput="this.nextElementSibling.value = this.value"/>
<output>50</output>
</div>
</div>
<div class="mode-fields">
<label for="top-p">Top P</label>
<div class="range-container">
<input id="top-p" type="range" min="0.1" max="1.0" step="0.05" value="0.95" oninput="this.nextElementSibling.value = this.value"/>
<output>0.95</output>
</div>
</div>
</div>
<button id="toggle-settings-btn">Advanced Settings</button>
<button id="text-gen-submit" type="submit">Submit</button>
<!--
<div class="mode-fields" style="padding-top: 15px;">
<input type="checkbox" id="send-email">
<label for="send-email">Receive results via email</label>
</div>
<div id="show-email" class="mode-fields" style="display: none">
<label for="email-prompt">Please provide your email</label>
<input id="email-prompt" type="text" />
</div>
-->
<p class="text-gen-output"></p>
</form>
</section>
</main>
<script src="script.js"></script>
</body>
</main> |