Fix UI - added fonts, favicon etc

This commit is contained in:
PragatiVerma18 2020-10-11 13:57:27 +05:30
parent 8e51d930f9
commit 657c995596
7 changed files with 180 additions and 13 deletions

148
README.md
View File

@ -1 +1,147 @@
# Fantastic-Falcons-1.0 # MLH Quizzet
This is a smart Quiz Generator that generates a dynamic quiz from any uploaded text/PDF document using NLP. This can be used for self-analysis, question paper generation, and evaluation, thus reducing human effort.
[![Forks](https://img.shields.io/github/forks/PragatiVerma18/Fantastic-Falcons-1.0?style=social)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/network/members)
[![Stars](https://img.shields.io/github/stars/PragatiVerma18/Fantastic-Falcons-1.0?style=social)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/stargazers)
[![Watchers](https://img.shields.io/github/watchers/PragatiVerma18/Fantastic-Falcons-1.0?style=social)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/watchers)
[![PRs](https://img.shields.io/github/issues-pr/PragatiVerma18/Fantastic-Falcons-1.0)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/pulls)
[![Issues](https://img.shields.io/github/issues/PragatiVerma18/Fantastic-Falcons-1.0)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/issues)
[![License](https://img.shields.io/github/license/PragatiVerma18/Fantastic-Falcons-1.0)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/blob/master/LICENSE)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/PragatiVerma18/Fantastic-Falcons-1.0/graphs/commit-activity)
[![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/)
## Features
- implements automatic question generation _(AQG) techniques_
> **Automatic question generation (AQG)** is concerned with the construction of algorithms for producing questions from knowledge sources, which can be either structured (e.g. knowledge bases (KBs) or unstructured (e.g. text))
- helps in **resource saving**(time, money and human effort)
- enables the **enrichment of the teaching** process, adapt learning to student knowledge and needs, as well as drill and practice exercises
- presents an _automatic mechanism_ to assemble exams or to adaptively select questions from a question bank
## Technology Stack:
<img src="https://img.shields.io/badge/html5%20-%23E34F26.svg?&style=for-the-badge&logo=html5&logoColor=white"/> <img src="https://img.shields.io/badge/css3%20-%231572B6.svg?&style=for-the-badge&logo=css3&logoColor=white"/> <img src="https://img.shields.io/badge/javascript%20-%23323330.svg?&style=for-the-badge&logo=javascript&logoColor=%23F7DF1E"/> <img src="https://img.shields.io/badge/python%20-%2314354C.svg?&style=for-the-badge&logo=python&logoColor=white"/> <img src="https://img.shields.io/badge/flask%20-%23000.svg?&style=for-the-badge&logo=flask&logoColor=white"/> <img src="https://img.shields.io/badge/bootstrap%20-%23563D7C.svg?&style=for-the-badge&logo=bootstrap&logoColor=white"/> <img src="https://img.shields.io/badge/github%20-%23121011.svg?&style=for-the-badge&logo=github&logoColor=white"/> <img src ="https://img.shields.io/badge/sqlite-%2307405e.svg?&style=for-the-badge&logo=sqlite&logoColor=white"/>
- **Frontend**: HTML, CSS, Vanilla JS
- **Backend**: Flask
- **IDE**: VS Code
- **Design**: Canva
- **Version Control**: Git and GitHub
- **Database**: Sqllite3
## How to Get Started?
[![Requirements Up To Date](https://img.shields.io/badge/requirements-up%20to%20date-brightgreen)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/blob/webapp/requirements.txt)
[![Python](https://img.shields.io/badge/python-v3.7-blue)](https://www.python.org/)
### GitHub Repository Structure
| S.No. | Branch Name | Purpose |
| ----- | ----------------------------------------------------------------------------- | ---------------------------------- |
| 1. | [master](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/tree/master) | contains the main code |
| 2. | [nlp](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/tree/nlp) | contains all machine learning code |
| 3. | [webapp](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/tree/webapp) | contains all frontend/backend code |
### Setup
- Fork and Clone the repo using
```
$ git clone https://github.com/PragatiVerma18/Fantastic-Falcons-1.0.git
$ cd Fantastic-Falcons-1.0
```
- Change Branch to `webapp` using
```
$ git checkout webapp
```
- Setup Virtual environment
```
$ python3 -m venv env
```
- Activate the virtual environment
```
$ source env/bin/activate
```
- Install dependencies using
```
$ pip install -r requirements.txt
```
- Run Flask server using
```
$ python app.py
```
## Browser Support
- **Firefox**: version 4 and up
- **Chrome**: any version
- **Safari**: version 5.2 and up
- **Internet Explorer/Edge**: version 8 and up
- **Opera**: version 9 and up
> **Note**: Support for modern mobile browsers is experimental. The website is not responsive in mobile devices until now.
## MLH Fellowship( Fall 2020)
> This is a hackathon project made by MLH Fellows(Fall 2020) - Pod 1.0.0 i.e. Fantastic Falcons
[![MLH Fellowship](https://challengepost-s3-challengepost.netdna-ssl.com/photos/production/challenge_photos/001/113/145/datas/original.jpg)](https://github.com/MLH-Fellowship)
## Team:
> "Alone we can do so little; together we can do so much."
| S.No. | Name | Role | GitHub Username:octocat: |
| ----- | ------------------ | ------------------ | ---------------------------------------------------- |
| 1. | Pragati Verma | Frontend Developer | [@PragatiVerma18](https://github.com/PragatiVerma18) |
| 2. | Kshitij Kotasthane | Backend Developer | [@kshitij86](https://github.com/kshitij86) |
| 3. | Vignesh S | ML | [@telescopic](https://github.com/telescopic) |
<br>
<br>
![Fantastic Falcons](https://user-images.githubusercontent.com/42115530/95672625-0aef1880-0bc0-11eb-8db6-90f6e16af2c0.gif)
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody><tr>
<td align="center"><a href="https://www.linkedin.com/in/PragatiVerma18/"><img alt="" src="https://avatars2.githubusercontent.com/u/42115530?v=4" width="100px;"><br><sub><b>Pragati Verma</b></sub></a><br><a href="https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/commits?author=PragatiVerma18" title="Code">💻</a></td>
<td align="center"><a href="https://kshitij86.github.io/"><img alt="" src="https://avatars1.githubusercontent.com/u/26821140?s=460&u=c86d062a10d9d4495dd39c0ad4f8601ba256d670&v=4" width="100px;"><br><sub><b>Kshitij Kotasthane</b></sub></a><br><a href="https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/commits?author=kshitij86" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/telescopic"><img alt="" src="https://avatars1.githubusercontent.com/u/45061877?s=400&u=07ac89db20b5d84eb1abd4a0769b19d030f8ceb8&v=4" width="100px;"><br><sub><b>Vignesh S</b></sub></a><br><a href="https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/commits?author=telescopic" title="Code">💻</a></td>
</tr>
</tbody></table>
<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
[![ForTheBadge uses-git](http://ForTheBadge.com/images/badges/uses-git.svg)](https://github.com/)
[![ForTheBadge uses-html](http://ForTheBadge.com/images/badges/uses-html.svg)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/)
[![ForTheBadge uses-css](http://ForTheBadge.com/images/badges/uses-css.svg)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/)
[![ForTheBadge uses-js](http://ForTheBadge.com/images/badges/uses-js.svg)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/)
[![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)
[![ForTheBadge built-by-developers](http://ForTheBadge.com/images/badges/built-by-developers.svg)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/)
[![ForTheBadge built-with-love](http://ForTheBadge.com/images/badges/built-with-love.svg)](https://github.com/PragatiVerma18/Fantastic-Falcons-1.0/)
---

View File

@ -1,3 +1,4 @@
@import url("https://fonts.googleapis.com/css2?family=Open+Sans&display=swap");
html { html {
box-sizing: border-box; box-sizing: border-box;
} }
@ -10,9 +11,8 @@ html {
html, html,
body { body {
overflow: hidden;
position: relative; position: relative;
height: 100%; overflow-x: hidden !important;
} }
body { body {
@ -24,6 +24,7 @@ body {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 2 1'%3E%3Cdefs%3E%3ClinearGradient id='a' gradientUnits='userSpaceOnUse' x1='0' x2='0' y1='0' y2='1'%3E%3Cstop offset='0' stop-color='%2377aa77'/%3E%3Cstop offset='1' stop-color='%234fd'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23cf8' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23cf8' stop-opacity='1'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='2' y2='2'%3E%3Cstop offset='0' stop-color='%23cf8' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23cf8' stop-opacity='1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='0' y='0' fill='url(%23a)' width='2' height='1'/%3E%3Cg fill-opacity='0.5'%3E%3Cpolygon fill='url(%23b)' points='0 1 0 0 2 0'/%3E%3Cpolygon fill='url(%23c)' points='2 1 2 0 0 0'/%3E%3C/g%3E%3C/svg%3E"); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 2 1'%3E%3Cdefs%3E%3ClinearGradient id='a' gradientUnits='userSpaceOnUse' x1='0' x2='0' y1='0' y2='1'%3E%3Cstop offset='0' stop-color='%2377aa77'/%3E%3Cstop offset='1' stop-color='%234fd'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23cf8' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23cf8' stop-opacity='1'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='2' y2='2'%3E%3Cstop offset='0' stop-color='%23cf8' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23cf8' stop-opacity='1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='0' y='0' fill='url(%23a)' width='2' height='1'/%3E%3Cg fill-opacity='0.5'%3E%3Cpolygon fill='url(%23b)' points='0 1 0 0 2 0'/%3E%3Cpolygon fill='url(%23c)' points='2 1 2 0 0 0'/%3E%3C/g%3E%3C/svg%3E");
background-attachment: fixed; background-attachment: fixed;
background-size: cover; background-size: cover;
font-family: "helvetica", sans-serif !important;
} }
a { a {
@ -33,7 +34,6 @@ a {
section { section {
padding-top: 150px; padding-top: 150px;
overflow-y: hidden;
} }
main { main {
@ -43,9 +43,9 @@ main {
color: #000000; color: #000000;
background: #ffffff; background: #ffffff;
border-radius: 10px; border-radius: 10px;
padding: 50px 20px 50px; padding: 50px 40px 50px;
width: 95%; width: 95%;
max-width: 500px; max-width: 590px;
margin: auto; margin: auto;
} }
@ -58,7 +58,7 @@ input[type="radio"] {
} }
input[type="radio"] + label { input[type="radio"] + label {
display: inline-block; display: inline-block;
width: 95%; width: 100%;
padding: 10px; padding: 10px;
border: 1px solid #ddd; border: 1px solid #ddd;
margin-bottom: 10px; margin-bottom: 10px;

View File

@ -1,3 +1,4 @@
@import url("https://fonts.googleapis.com/css2?family=Open+Sans&display=swap");
html, html,
body { body {
display: flex; display: flex;
@ -9,12 +10,14 @@ body {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 2 1'%3E%3Cdefs%3E%3ClinearGradient id='a' gradientUnits='userSpaceOnUse' x1='0' x2='0' y1='0' y2='1'%3E%3Cstop offset='0' stop-color='%2377aa77'/%3E%3Cstop offset='1' stop-color='%234fd'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23cf8' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23cf8' stop-opacity='1'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='2' y2='2'%3E%3Cstop offset='0' stop-color='%23cf8' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23cf8' stop-opacity='1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='0' y='0' fill='url(%23a)' width='2' height='1'/%3E%3Cg fill-opacity='0.5'%3E%3Cpolygon fill='url(%23b)' points='0 1 0 0 2 0'/%3E%3Cpolygon fill='url(%23c)' points='2 1 2 0 0 0'/%3E%3C/g%3E%3C/svg%3E"); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 2 1'%3E%3Cdefs%3E%3ClinearGradient id='a' gradientUnits='userSpaceOnUse' x1='0' x2='0' y1='0' y2='1'%3E%3Cstop offset='0' stop-color='%2377aa77'/%3E%3Cstop offset='1' stop-color='%234fd'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23cf8' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23cf8' stop-opacity='1'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='2' y2='2'%3E%3Cstop offset='0' stop-color='%23cf8' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23cf8' stop-opacity='1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='0' y='0' fill='url(%23a)' width='2' height='1'/%3E%3Cg fill-opacity='0.5'%3E%3Cpolygon fill='url(%23b)' points='0 1 0 0 2 0'/%3E%3Cpolygon fill='url(%23c)' points='2 1 2 0 0 0'/%3E%3C/g%3E%3C/svg%3E");
background-attachment: fixed; background-attachment: fixed;
background-size: cover; background-size: cover;
font-family: "helvetica", sans-serif !important;
overflow-x: hidden !important;
} }
.card { .card {
border-radius: 10px; border-radius: 10px;
margin-top: 100px !important; margin-top: 100px !important;
height: 500px !important; height: 400px !important;
width: 400px; width: 300px;
} }
.card.has-text-centered .card-header, .card.has-text-centered .card-header,
@ -50,6 +53,7 @@ body {
color: white; color: white;
font-weight: 400; font-weight: 400;
overflow: hidden; overflow: hidden;
font-family: "Open Sans", sans-serif !important;
} }
.button:before { .button:before {
position: absolute; position: absolute;

BIN
static/fonts/helvetica.ttf Normal file

Binary file not shown.

View File

@ -6,11 +6,19 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css" />
<link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/style.css') }}" /> <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/style.css') }}" />
<link rel="shortcut icon" href="https://avatars0.githubusercontent.com/u/65834464?s=200&amp;v=4" type="image/x-icon">
<script src="https://kit.fontawesome.com/22be60108b.js" crossorigin="anonymous"></script> <script src="https://kit.fontawesome.com/22be60108b.js" crossorigin="anonymous"></script>
<title>MLH Quizzet</title> <title>MLH Quizzet</title>
</head> </head>
<body> <body>
<style type="text/css">
@font-face {
font-family: helvetica;
src:
"{{ url_for('static', filename='fonts/helvetica.ttf')}}"
}
</style>
<nav class="navbar is-dark is-fixed-top has-text-centered" role="navigation" aria-label="main navigation"> <nav class="navbar is-dark is-fixed-top has-text-centered" role="navigation" aria-label="main navigation">
<div class="navbar-brand"><img src="https://avatars0.githubusercontent.com/u/65834464?s=200&amp;v=4" height="32" <div class="navbar-brand"><img src="https://avatars0.githubusercontent.com/u/65834464?s=200&amp;v=4" height="32"
width="64" style="margin: 10px"> width="64" style="margin: 10px">

View File

@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css" />
<link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/quiz.css') }}" /> <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/quiz.css') }}" />
<link rel="shortcut icon" href="https://avatars0.githubusercontent.com/u/65834464?s=200&amp;v=4" type="image/x-icon">
<title>MLH Quizzet</title> <title>MLH Quizzet</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type='text/javascript'></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type='text/javascript'></script>
<script type="text/javascript"> <script type="text/javascript">
@ -19,9 +20,15 @@
</head> </head>
<body> <body>
<style type="text/css">
@font-face {
font-family: helvetica;
src: "{{ url_for('static', filename='fonts/helvetica.ttf')}}"
}
</style>
<nav class="navbar is-dark is-fixed-top has-text-centered" role="navigation" aria-label="main navigation"> <nav class="navbar is-dark is-fixed-top has-text-centered" role="navigation" aria-label="main navigation">
<div class="navbar-brand"><img src="https://avatars0.githubusercontent.com/u/65834464?s=200&amp;v=4" height="32" <div class="navbar-brand"><img src="https://avatars0.githubusercontent.com/u/65834464?s=200&amp;v=4" height="32"
width="64" style="margin: 10px"> width="64" style="margin: 7px">
<a class="navbar-item has-text-centered" href="{{ url_for('index') }}"><strong <a class="navbar-item has-text-centered" href="{{ url_for('index') }}"><strong
class="is-size-3 has-text-centered">MLH class="is-size-3 has-text-centered">MLH
Quizzet</strong></a> Quizzet</strong></a>
@ -38,7 +45,7 @@
<main> <main>
<div class="scp-quizzes-main"> <div class="scp-quizzes-main">
<div class="scp-quizzes-data"> <div class="scp-quizzes-data">
<h3>{{ i+1 }}. {{ questions[i+1]['question'] }}</h3> <h3 class="is-size-6 has-text-weight-bold">{{ i+1 }}. {{ questions[i+1]['question'] }}</h3>
<br /> <br />
<form> <form>
{% for op in questions[i+1]['options'] %} {% for op in questions[i+1]['options'] %}
@ -63,7 +70,9 @@
</section> </section>
{% endif %} {% endif %}
<div class="has-text-white has-text-centered" style="margin-top: 50px; background-color: #363636; padding: 10px;">
MIT License © Copyright 2020 Fantastic Falcons
</div>
</body> </body>
</html> </html>

View File

@ -24,7 +24,7 @@ def pdf2text(file_path: str, file_exten: str) -> str:
return _content return _content
def txt2questions(doc: str, n=1, o=4) -> dict: def txt2questions(doc: str, n=5, o=4) -> dict:
""" Get all questions and options """ """ Get all questions and options """
qGen = QuestionGeneration(n, o) qGen = QuestionGeneration(n, o)