nixaut-codelabs commited on
Commit
337a776
·
verified ·
1 Parent(s): 0d556f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -40,7 +40,7 @@ torch.set_num_threads(int(os.environ["OMP_NUM_THREADS"]))
40
  torch.set_num_interop_threads(1)
41
  torch.set_float32_matmul_precision("high")
42
 
43
- app = FastAPI(title="AI Content Moderator API", description="Advanced content moderation API powered by AI")
44
 
45
  app.mount("/static", StaticFiles(directory="static"), name="static")
46
  templates = Jinja2Templates(directory="templates")
@@ -538,7 +538,7 @@ with open("templates/index.html", "w", encoding='utf-8') as f:
538
  <head>
539
  <meta charset="UTF-8">
540
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
541
- <title>AI Content Moderator</title>
542
  <script src="https://cdn.tailwindcss.com"></script>
543
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
544
  <style>
@@ -581,7 +581,7 @@ with open("templates/index.html", "w", encoding='utf-8') as f:
581
  <div class="inline-block p-4 rounded-full glass-effect float-animation mb-6">
582
  <i class="fas fa-shield-alt text-5xl text-white"></i>
583
  </div>
584
- <h1 class="text-4xl md:text-5xl font-bold mb-4">AI Content Moderator</h1>
585
  <p class="text-xl text-gray-200 max-w-2xl mx-auto">
586
  Advanced, multilingual and multimodal content classification tool powered by AI
587
  </p>
@@ -606,8 +606,8 @@ with open("templates/index.html", "w", encoding='utf-8') as f:
606
  <div class="mb-4">
607
  <label class="block text-sm font-medium mb-2">Text Model</label>
608
  <select id="textModelSelect" class="w-full px-4 py-3 rounded-lg bg-white/10 border border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400 text-white">
609
- <option value="gemma">Gemma (Fast)</option>
610
- <option value="detoxify">Detoxify (Detailed)</option>
611
  <option value="both">Both (Most Accurate)</option>
612
  </select>
613
  </div>
@@ -801,7 +801,7 @@ with open("templates/index.html", "w", encoding='utf-8') as f:
801
  <i class="fas fa-image text-2xl text-indigo-300"></i>
802
  </div>
803
  <h3 class="text-lg font-semibold mb-2">Multimodal</h3>
804
- <p class="text-gray-300">Analyzes both text and images for comprehensive content moderation.</p>
805
  </div>
806
  <div class="text-center">
807
  <div class="inline-block p-3 rounded-full bg-indigo-500/20 mb-3">
@@ -814,7 +814,7 @@ with open("templates/index.html", "w", encoding='utf-8') as f:
814
  </div>
815
  </main>
816
  <footer class="mt-12 text-center text-gray-300">
817
- <p>© 2023 AI Content Moderator. All rights reserved.</p>
818
  </footer>
819
  </div>
820
 
 
40
  torch.set_num_interop_threads(1)
41
  torch.set_float32_matmul_precision("high")
42
 
43
+ app = FastAPI(title="Smart Moderator API", description="Advanced content moderation API powered by AI")
44
 
45
  app.mount("/static", StaticFiles(directory="static"), name="static")
46
  templates = Jinja2Templates(directory="templates")
 
538
  <head>
539
  <meta charset="UTF-8">
540
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
541
+ <title>Smart Moderator</title>
542
  <script src="https://cdn.tailwindcss.com"></script>
543
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
544
  <style>
 
581
  <div class="inline-block p-4 rounded-full glass-effect float-animation mb-6">
582
  <i class="fas fa-shield-alt text-5xl text-white"></i>
583
  </div>
584
+ <h1 class="text-4xl md:text-5xl font-bold mb-4">Smart Moderator</h1>
585
  <p class="text-xl text-gray-200 max-w-2xl mx-auto">
586
  Advanced, multilingual and multimodal content classification tool powered by AI
587
  </p>
 
606
  <div class="mb-4">
607
  <label class="block text-sm font-medium mb-2">Text Model</label>
608
  <select id="textModelSelect" class="w-full px-4 py-3 rounded-lg bg-white/10 border border-white/20 focus:outline-none focus:ring-2 focus:ring-indigo-400 text-white">
609
+ <option value="gemma">Gemma (Google)</option>
610
+ <option value="detoxify">Detoxify (Unitary AI)</option>
611
  <option value="both">Both (Most Accurate)</option>
612
  </select>
613
  </div>
 
801
  <i class="fas fa-image text-2xl text-indigo-300"></i>
802
  </div>
803
  <h3 class="text-lg font-semibold mb-2">Multimodal</h3>
804
+ <p class="text-gray-300">Analyzes both text and images for comprehensive content moderation. (Falcons.AI for multimodal model)</p>
805
  </div>
806
  <div class="text-center">
807
  <div class="inline-block p-3 rounded-full bg-indigo-500/20 mb-3">
 
814
  </div>
815
  </main>
816
  <footer class="mt-12 text-center text-gray-300">
817
+ <p>© 2025 Smart Moderator. All rights reserved.</p>
818
  </footer>
819
  </div>
820