ClemSummer commited on
Commit
3aa3d4c
Β·
1 Parent(s): 405db35

updated web pages

Browse files
Dockerfile CHANGED
@@ -33,4 +33,4 @@ HEALTHCHECK CMD curl --fail http://localhost:7860/ || exit 1
33
  #CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
34
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "debug"]
35
 
36
- # some change to trigger rebuild 2
 
33
  #CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
34
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "debug"]
35
 
36
+ # some change to trigger rebuild 3
main.py CHANGED
@@ -39,6 +39,11 @@ async def captioning():
39
  async def project2():
40
  return "<h1>Coming Soon: Project 2</h1>"
41
 
 
 
 
 
 
42
  # βœ… Caption generation endpoint for captioning app
43
  # Keep the path consistent with your JS fetch()!
44
  caption_generator = CaptionGenerator(
@@ -47,7 +52,6 @@ caption_generator = CaptionGenerator(
47
  quantized=False
48
  )
49
 
50
- @app.post("/generate")
51
  @app.post("/generate")
52
  async def generate(file: UploadFile = File(...)):
53
  temp_file = os.path.join("/tmp", file.filename)
 
39
  async def project2():
40
  return "<h1>Coming Soon: Project 2</h1>"
41
 
42
+ # βœ… Example: Project 2 placeholder
43
+ @app.get("/project3", response_class=HTMLResponse)
44
+ async def project2():
45
+ return "<h1>Coming Soon: Project 3</h1>"
46
+
47
  # βœ… Caption generation endpoint for captioning app
48
  # Keep the path consistent with your JS fetch()!
49
  caption_generator = CaptionGenerator(
 
52
  quantized=False
53
  )
54
 
 
55
  @app.post("/generate")
56
  async def generate(file: UploadFile = File(...)):
57
  temp_file = os.path.join("/tmp", file.filename)
vit_captioning/static/captioning/index.html CHANGED
@@ -41,7 +41,7 @@
41
  type="submit"
42
  class="w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold py-2 px-4 rounded-lg transition"
43
  >
44
- Generate Captions
45
  </button>
46
  </form>
47
 
 
41
  type="submit"
42
  class="w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold py-2 px-4 rounded-lg transition"
43
  >
44
+ Generate Captions (can repeat)
45
  </button>
46
  </form>
47
 
vit_captioning/static/landing.html CHANGED
@@ -14,7 +14,10 @@
14
  πŸ–ΌοΈ Image Captioning
15
  </a>
16
  <a href="/project2" class="block w-full bg-green-600 hover:bg-green-700 text-white py-3 rounded-lg shadow text-lg font-semibold">
17
- πŸ€– Coming Soon: Word calculator
 
 
 
18
  </a>
19
  <!-- Add more project links here -->
20
  </div>
 
14
  πŸ–ΌοΈ Image Captioning
15
  </a>
16
  <a href="/project2" class="block w-full bg-green-600 hover:bg-green-700 text-white py-3 rounded-lg shadow text-lg font-semibold">
17
+ πŸ€– Coming Soon: Word meaning calculator
18
+ </a>
19
+ <a href="/project3" class="block w-full bg-green-600 hover:bg-green-700 text-white py-3 rounded-lg shadow text-lg font-semibold">
20
+ πŸ“š Coming Soon: Text Summerizer
21
  </a>
22
  <!-- Add more project links here -->
23
  </div>