Technozam commited on
Commit
accb8e2
1 Parent(s): c8f326c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -16
app.py CHANGED
@@ -1,15 +1,3 @@
1
- # -*- coding: utf-8 -*-
2
- """McqGenerator.ipynb
3
-
4
- Automatically generated by Colaboratory.
5
-
6
- Original file is located at
7
- https://colab.research.google.com/drive/1_1AYqOfr649dp8QiMuV3GPiNH_bMdpUA
8
-
9
- ## Installation of libraries
10
-
11
- ## Example 1
12
- """
13
 
14
  from textwrap3 import wrap
15
 
@@ -49,9 +37,9 @@ def set_seed(seed: int):
49
  set_seed(42)
50
 
51
  import nltk
52
- # nltk.download('punkt')
53
- # nltk.download('brown')
54
- # nltk.download('wordnet')
55
  from nltk.corpus import wordnet as wn
56
  from nltk.tokenize import sent_tokenize
57
 
@@ -209,9 +197,12 @@ for answer in imp_keywords:
209
 
210
  """# **Gradio UI Visualization**"""
211
 
 
 
 
212
  import numpy as np
213
  from sense2vec import Sense2Vec
214
- s2v = Sense2Vec().from_disk('../s2v_old')
215
 
216
  from sentence_transformers import SentenceTransformer
217
  # paraphrase-distilroberta-base-v1
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
  from textwrap3 import wrap
3
 
 
37
  set_seed(42)
38
 
39
  import nltk
40
+ nltk.download('punkt')
41
+ nltk.download('brown')
42
+ nltk.download('wordnet')
43
  from nltk.corpus import wordnet as wn
44
  from nltk.tokenize import sent_tokenize
45
 
 
197
 
198
  """# **Gradio UI Visualization**"""
199
 
200
+ wget https://github.com/explosion/sense2vec/releases/download/v1.0.0/s2v_reddit_2015_md.tar.gz
201
+ tar -xvf s2v_reddit_2015_md.tar.gz
202
+
203
  import numpy as np
204
  from sense2vec import Sense2Vec
205
+ s2v = Sense2Vec().from_disk('s2v_old')
206
 
207
  from sentence_transformers import SentenceTransformer
208
  # paraphrase-distilroberta-base-v1