Skip to content

Commit

Permalink
try to fix nsfwjs stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Not-A-Normal-Robot committed May 22, 2024
1 parent 8af7431 commit cb7201e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 12 additions & 2 deletions auth/profile-setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ <h1 class="center-text">Set up your profile</h1>
<label for="username">
Username <span class="required" title="Required">*</span>
</label>
<input type="text" id="username" name="username" required maxlength="30" placeholder="Username">
<input type="text" id="username" name="username" required maxlength="40" placeholder="Username">
<span class="char-count" for="username"></span>
<label for="bio">Bio</label>
<textarea class="" id="bio" name="bio" maxlength="400" placeholder="Write some text about yourself"></textarea>
<textarea class="" id="bio" name="bio" maxlength="250" placeholder="Write some text about yourself"></textarea>
<span class="char-count" for="bio"></span>
<button type="submit">
Confirm
Expand All @@ -67,8 +67,18 @@ <h1 class="center-text">Set up your profile</h1>
</section>
</div>

<!-- Scripts -->

<!-- Background -->
<script src="/js/background.js"></script>

<!-- NSFWJS stuff -->
<script src="https://unpkg.com/@tensorflow/tfjs@4"></script>
<script src="https://unpkg.com/nsfwjs@4/dist/browser/nsfwjs.min.js"></script>
<script src="https://unpkg.com/nsfwjs@4/dist/models/mobilenet_v2/model.min.js"></script>
<script src="https://unpkg.com/nsfwjs@4/dist/models/mobilenet_v2/group1-shard1of1.min.js"></script>

<!-- Profile setup script -->
<script src="/js/profile-setup.js" type="module"></script>
</body>
</html>
2 changes: 0 additions & 2 deletions js/profile-setup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { SUPABASE } from "./db.js";
import * as nsfwjs from "https://cdn.jsdelivr.net/npm/[email protected]/+esm";
import "https://cdn.jsdelivr.net/npm/models/mobilenet_v2/model.min.js";

let NSFWJSInstance = null;

Expand Down

0 comments on commit cb7201e

Please sign in to comment.