Commit Β·
548e733
1
Parent(s): 8b65a0f
Create the docker file
Browse files- .dockerignore +15 -0
- Dockerfile +23 -0
- README_HF.md +58 -0
- next.config.ts +7 -1
.dockerignore
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
node_modules
|
| 2 |
+
.next
|
| 3 |
+
.git
|
| 4 |
+
.gitignore
|
| 5 |
+
README.md
|
| 6 |
+
.env
|
| 7 |
+
.env.local
|
| 8 |
+
.env.development.local
|
| 9 |
+
.env.test.local
|
| 10 |
+
.env.production.local
|
| 11 |
+
npm-debug.log*
|
| 12 |
+
yarn-debug.log*
|
| 13 |
+
yarn-error.log*
|
| 14 |
+
.DS_Store
|
| 15 |
+
*.tsbuildinfo
|
Dockerfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Node.js 18 image
|
| 2 |
+
FROM node:18-alpine
|
| 3 |
+
|
| 4 |
+
# Set the working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy package files
|
| 8 |
+
COPY package*.json ./
|
| 9 |
+
|
| 10 |
+
# Install dependencies
|
| 11 |
+
RUN npm ci --only=production
|
| 12 |
+
|
| 13 |
+
# Copy the rest of the application
|
| 14 |
+
COPY . .
|
| 15 |
+
|
| 16 |
+
# Build the application
|
| 17 |
+
RUN npm run build
|
| 18 |
+
|
| 19 |
+
# Expose the port that the app runs on
|
| 20 |
+
EXPOSE 3000
|
| 21 |
+
|
| 22 |
+
# Start the application
|
| 23 |
+
CMD ["npm", "start"]
|
README_HF.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: QuizFlash - AI-Powered Quiz Generation
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
license: mit
|
| 9 |
+
app_port: 3000
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# QuizFlash - AI-Powered Quiz Generation
|
| 13 |
+
|
| 14 |
+
An intelligent quiz creation tool that helps educators generate interactive assessments using AI. Create various types of questions including cloze tests, comprehension questions, and more.
|
| 15 |
+
|
| 16 |
+
## Features
|
| 17 |
+
|
| 18 |
+
- π€ AI-powered question generation
|
| 19 |
+
- π Multiple question types (Cloze, Word Comprehension, Grammar, etc.)
|
| 20 |
+
- π Source article integration
|
| 21 |
+
- π¬ Interactive chat interface
|
| 22 |
+
- π― Customizable difficulty levels
|
| 23 |
+
- π Question bank management
|
| 24 |
+
|
| 25 |
+
## How to Use
|
| 26 |
+
|
| 27 |
+
1. **Select Question Type**: Choose from various question formats
|
| 28 |
+
2. **Configure Parameters**: Set difficulty, grade level, and other options
|
| 29 |
+
3. **Add Source Article**: Provide text content for question generation
|
| 30 |
+
4. **Generate Questions**: Let AI create questions based on your specifications
|
| 31 |
+
5. **Manage Questions**: Edit, reorder, and export your quiz
|
| 32 |
+
|
| 33 |
+
## Environment Variables
|
| 34 |
+
|
| 35 |
+
Make sure to set your OpenAI API key in the Hugging Face Space settings:
|
| 36 |
+
|
| 37 |
+
```
|
| 38 |
+
OPENAI_API_KEY=your_openai_api_key_here
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
## Question Types
|
| 42 |
+
|
| 43 |
+
- **Cloze (Fill-in-the-blank)**: Test vocabulary and comprehension
|
| 44 |
+
- **Word Comprehension**: Assess vocabulary understanding in context
|
| 45 |
+
- **Grammar Structure**: Identify grammatical patterns
|
| 46 |
+
- **Paragraph Structure**: Analyze text organization
|
| 47 |
+
- **Paragraph Summary**: Create text summaries
|
| 48 |
+
- **Paragraph Details**: Identify key information
|
| 49 |
+
- **Textual Inference**: Make logical inferences from text
|
| 50 |
+
|
| 51 |
+
## Technology Stack
|
| 52 |
+
|
| 53 |
+
- Next.js 15 with App Router
|
| 54 |
+
- React 19
|
| 55 |
+
- TypeScript
|
| 56 |
+
- Tailwind CSS
|
| 57 |
+
- OpenAI GPT-4o-mini
|
| 58 |
+
- AI SDK for React
|
next.config.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
| 1 |
import type { NextConfig } from "next";
|
| 2 |
|
| 3 |
const nextConfig: NextConfig = {
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
};
|
| 6 |
|
| 7 |
export default nextConfig;
|
|
|
|
| 1 |
import type { NextConfig } from "next";
|
| 2 |
|
| 3 |
const nextConfig: NextConfig = {
|
| 4 |
+
output: 'standalone',
|
| 5 |
+
experimental: {
|
| 6 |
+
outputFileTracingRoot: undefined,
|
| 7 |
+
},
|
| 8 |
+
env: {
|
| 9 |
+
OPENAI_API_KEY: process.env.OPENAI_API_KEY,
|
| 10 |
+
},
|
| 11 |
};
|
| 12 |
|
| 13 |
export default nextConfig;
|