File size: 966 Bytes
96988dd
c246087
3b47a08
96988dd
b819dd2
 
 
 
 
96988dd
b819dd2
96988dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
### Note:
Credits to https://www.kaggle.com/datasets/fabiochiusano/medium-articles for the dataset

# Use-Case:
This article generator is to brainstorm introduction and ideas for blogging purposes. Due to hardware limitations, the API can only effectively return up to 300-400 tokens.

Link to API: https://jdvariadic-gpt2-article-generator.hf.space
POST endpoint: generate-article

# Query Parameters:

**title**(str): Generates a short article given the title

**max_length**(int, optional): Specifies the max number of tokens generated by GPT-2

**top_k**(int, optional): Specifices the parameter top_k for the sampling method used.

# Setup Guide:

Go to https://huggingface.co/spaces

Click on Create New Space.

Specify name, license, and click on Blank Docker template

Select Space hardware (For this implementation, the CPU basic is used)

Build the endpoint by selecting Create Space.

# Model Fine-Tuning guide:

Feel free to reference preprocessing.ipynb