Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# GPT2 Keyword Based Lecture Generator
|
2 |
+
|
3 |
+
## Model description
|
4 |
+
|
5 |
+
GPT2 fine-tuned on the TED Talks Dataset (published under the Creative Commons BY-NC-ND license).
|
6 |
+
|
7 |
+
## Intended uses
|
8 |
+
|
9 |
+
Used to generate spoken-word lectures.
|
10 |
+
|
11 |
+
### How to use
|
12 |
+
|
13 |
+
Input text:
|
14 |
+
|
15 |
+
<BOS> title <|SEP|> Some keywords <|SEP|>
|
16 |
+
|
17 |
+
Keyword Format: "Main Topic"."Subtopic1","Subtopic2","Subtopic3"
|
18 |
+
|
19 |
+
Code Example:
|
20 |
+
```
|
21 |
+
prompt = <BOS> + title + \
|
22 |
+
<|SEP|> + keywords + <|SEP|>
|
23 |
+
|
24 |
+
generated = torch.tensor(tokenizer.encode(prompt)).unsqueeze(0)
|
25 |
+
|
26 |
+
model.eval();
|
27 |
+
```
|