theojolliffe commited on
Commit
062c5bd
1 Parent(s): dd2c861

commit from theojolliffe

Browse files
.DS_Store ADDED
Binary file (6.15 kB). View file
 
.ipynb_checkpoints/Untitled-checkpoint.ipynb ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [],
3
+ "metadata": {},
4
+ "nbformat": 4,
5
+ "nbformat_minor": 5
6
+ }
Untitled.ipynb ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "id": "2e1d3e9d-90ed-4806-8a00-f9ad5a968d0f",
7
+ "metadata": {},
8
+ "outputs": [
9
+ {
10
+ "ename": "NameError",
11
+ "evalue": "name 'model' is not defined",
12
+ "output_type": "error",
13
+ "traceback": [
14
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
15
+ "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
16
+ "\u001b[0;32m<ipython-input-1-ad8f33b93be8>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mtranslated\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgenerate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mtokenizer\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0msrc_text\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mreturn_tensors\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"pt\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpadding\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmax_length\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m1200\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
17
+ "\u001b[0;31mNameError\u001b[0m: name 'model' is not defined"
18
+ ]
19
+ }
20
+ ],
21
+ "source": [
22
+ "translated = model.generate(**tokenizer([src_text], return_tensors=\"pt\", padding=True), max_length=1200)"
23
+ ]
24
+ },
25
+ {
26
+ "cell_type": "code",
27
+ "execution_count": 2,
28
+ "id": "d309269c-0488-4638-b892-38005a5ee2c7",
29
+ "metadata": {},
30
+ "outputs": [
31
+ {
32
+ "ename": "ModuleNotFoundError",
33
+ "evalue": "No module named 'model'",
34
+ "output_type": "error",
35
+ "traceback": [
36
+ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
37
+ "\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
38
+ "\u001b[0;32m<ipython-input-2-b7450210bd4f>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
39
+ "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'model'"
40
+ ]
41
+ }
42
+ ],
43
+ "source": [
44
+ "import model"
45
+ ]
46
+ },
47
+ {
48
+ "cell_type": "code",
49
+ "execution_count": null,
50
+ "id": "8d997bcd-fc11-41ff-8822-08c89ba7e0b9",
51
+ "metadata": {},
52
+ "outputs": [],
53
+ "source": []
54
+ }
55
+ ],
56
+ "metadata": {
57
+ "kernelspec": {
58
+ "display_name": "Python 3",
59
+ "language": "python",
60
+ "name": "python3"
61
+ },
62
+ "language_info": {
63
+ "codemirror_mode": {
64
+ "name": "ipython",
65
+ "version": 3
66
+ },
67
+ "file_extension": ".py",
68
+ "mimetype": "text/x-python",
69
+ "name": "python",
70
+ "nbconvert_exporter": "python",
71
+ "pygments_lexer": "ipython3",
72
+ "version": "3.8.8"
73
+ }
74
+ },
75
+ "nbformat": 4,
76
+ "nbformat_minor": 5
77
+ }
runs/.DS_Store ADDED
Binary file (6.15 kB). View file
 
runs/May04_17-04-44_5446cad0c6e0/.DS_Store ADDED
Binary file (6.15 kB). View file