Skip to content

Commit

Permalink
regular update
Browse files Browse the repository at this point in the history
  • Loading branch information
4darsh-Dev committed Jan 30, 2024
1 parent 0c0b28f commit 1b2b686
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 289 deletions.
1 change: 1 addition & 0 deletions api/home/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
urlpatterns = [
path("", views.index, name="home"),
path("faqs/", views.faqs, name="faqs"),
path("report-dp/", views.reportDp, name="report-dp"),

]
8 changes: 7 additions & 1 deletion api/home/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@ def index(request):
return render(request, "index.html")

def faqs(request):
return render(request, "faqs.html")
return render(request, "faqs.html")

def reportDp(request):
return render(request, "report.html")

def about(request):
return render(request, "about.html")
2 changes: 2 additions & 0 deletions api/mlApi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def dpData(request):

scraped_text = get_scrape_data(url)

print(scraped_text)

# Fine-tune BERT model and classify dark pattern
# predicted_labels = fine_tune_and_classify(scraped_text)
predicted_labels= {"Sample": "This is a Sample dark pattern"}
Expand Down
2 changes: 1 addition & 1 deletion api/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ <h1 class="font-mid-large">CogniGuard</h1>
</footer>

</main>
<script src="app.js"></script>
<script src="script.js"></script>
{% block script %}

{% endblock script %}
Expand Down
3 changes: 2 additions & 1 deletion api/templates/faqs.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<link rel="stylesheet" href="{% static "css/faqs.css" %}">
{% endblock head %}

{% block title %}FAQs{% endblock title %}

{% block content %}
<section class="content-section">
<section class="faqs-heading font-secondary">
Expand Down Expand Up @@ -143,7 +145,6 @@ <h1 class="font-mid-medium">FAQS</h1>
</section>
{% endblock content %}


{% block script %}

{% endblock script %}
2 changes: 2 additions & 0 deletions api/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
{% load static %}
{% block head %}{% endblock head %}

{% block title %}Home{% endblock title %}

{% block content %}
<section class="content-section">
<header class="welcome flex-cont">
Expand Down
286 changes: 0 additions & 286 deletions api/terms_and_conditions_dataset.csv

This file was deleted.

0 comments on commit 1b2b686

Please sign in to comment.