-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Automatically consuming entries. #1
- Loading branch information
1 parent
da92870
commit 35de4c9
Showing
3 changed files
with
229 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,41 @@ | ||
<.flash_group flash={@flash} /> | ||
<div class="px-4 py-10 flex justify-center sm:px-6 sm:py-28 lg:px-8 xl:px-28 xl:py-32"> | ||
<div class="mx-auto max-w-xl w-[50vw] lg:mx-0"> | ||
<form> | ||
<div class="space-y-12"> | ||
<div> | ||
<h2 class="text-base font-semibold leading-7 text-gray-900">Image Classifier</h2> | ||
<p class="mt-1 text-sm leading-6 text-gray-600">Drag your images and we'll run an AI model to caption it!</p> | ||
<div class="space-y-12"> | ||
<div class="border-gray-900/10 pb-12"> | ||
<h2 class="text-base font-semibold leading-7 text-gray-900">Image Upload</h2> | ||
<p class="mt-1 text-sm leading-6 text-gray-600">Drag your images and they'll be uploaded to the cloud! ☁️</p> | ||
<p class="mt-1 text-sm leading-6 text-gray-600">You may add up to <%= @uploads.image_list.max_entries %> exhibits at a time.</p> | ||
|
||
<div class="mt-10 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6"> | ||
<!-- File upload section --> | ||
<div class="mt-10 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6"> | ||
|
||
<div class="col-span-full"> | ||
<div class="mt-2 flex justify-center rounded-lg border border-dashed border-gray-900/25 px-6 py-10"> | ||
<div class="text-center"> | ||
<svg class="mx-auto h-12 w-12 text-gray-300" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"> | ||
<path fill-rule="evenodd" d="M1.5 6a2.25 2.25 0 012.25-2.25h16.5A2.25 2.25 0 0122.5 6v12a2.25 2.25 0 01-2.25 2.25H3.75A2.25 2.25 0 011.5 18V6zM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0021 18v-1.94l-2.69-2.689a1.5 1.5 0 00-2.12 0l-.88.879.97.97a.75.75 0 11-1.06 1.06l-5.16-5.159a1.5 1.5 0 00-2.12 0L3 16.061zm10.125-7.81a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0z" clip-rule="evenodd" /> | ||
</svg> | ||
<div class="mt-4 flex text-sm leading-6 text-gray-600"> | ||
<label for="file-upload" class="relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500"> | ||
<span>Upload a file</span> | ||
<input id="file-upload" name="file-upload" type="file" class="sr-only"> | ||
</label> | ||
<p class="pl-1">or drag and drop</p> | ||
</div> | ||
<p class="text-xs leading-5 text-gray-600">PNG, JPG, GIF up to 10MB</p> | ||
<div class="col-span-full"> | ||
<div | ||
class="mt-2 flex justify-center rounded-lg border border-dashed border-gray-900/25 px-6 py-10" | ||
phx-drop-target={@uploads.image_list.ref} | ||
> | ||
<div class="text-center"> | ||
<svg class="mx-auto h-12 w-12 text-gray-300" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"> | ||
<path fill-rule="evenodd" d="M1.5 6a2.25 2.25 0 012.25-2.25h16.5A2.25 2.25 0 0122.5 6v12a2.25 2.25 0 01-2.25 2.25H3.75A2.25 2.25 0 011.5 18V6zM3 16.06V18c0 .414.336.75.75.75h16.5A.75.75 0 0021 18v-1.94l-2.69-2.689a1.5 1.5 0 00-2.12 0l-.88.879.97.97a.75.75 0 11-1.06 1.06l-5.16-5.159a1.5 1.5 0 00-2.12 0L3 16.061zm10.125-7.81a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0z" clip-rule="evenodd" /> | ||
</svg> | ||
<div class="mt-4 flex text-sm leading-6 text-gray-600"> | ||
<label for="file-upload" class="relative cursor-pointer rounded-md bg-white font-semibold text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-600 focus-within:ring-offset-2 hover:text-indigo-500"> | ||
<form phx-change="validate" phx-submit="save"> | ||
<label class="cursor-pointer"> | ||
<.live_file_input upload={@uploads.image_list} class="hidden" /> | ||
Upload | ||
</label> | ||
</form> | ||
</label> | ||
<p class="pl-1">or drag and drop</p> | ||
</div> | ||
<p class="text-xs leading-5 text-gray-600">PNG, JPG, GIF up to 10MB</p> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> |