ashwinR commited on
Commit
745c826
1 Parent(s): f8a0eef

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -8
README.md CHANGED
@@ -6,13 +6,18 @@ language:
6
  - en
7
  widget:
8
  - text: >
9
- def preprocess(text: str) -> str:
10
- text = str(text)
11
- text = text.replace('\\n', ' ')
12
- tokenized_text = text.split(' ')
13
- preprocessed_text = " ".join([token for token in tokenized_text if token])
14
-
15
- return preprocessed_text
 
 
 
 
 
16
  datasets:
17
  - sagard21/autotrain-data-code-explainer
18
  co2_eq_emissions:
@@ -41,7 +46,7 @@ from transformers import (
41
  pipeline,
42
  )
43
 
44
- model_name = "sagard21/python-code-explainer"
45
 
46
  tokenizer = AutoTokenizer.from_pretrained(model_name, padding=True)
47
 
 
6
  - en
7
  widget:
8
  - text: >
9
+ class Solution(object):
10
+ def isValid(self, s):
11
+ stack = []
12
+ mapping = {")": "(", "}": "{", "]": "["}
13
+ for char in s:
14
+ if char in mapping:
15
+ top_element = stack.pop() if stack else '#'
16
+ if mapping[char] != top_element:
17
+ return False
18
+ else:
19
+ stack.append(char)
20
+ return not stack
21
  datasets:
22
  - sagard21/autotrain-data-code-explainer
23
  co2_eq_emissions:
 
46
  pipeline,
47
  )
48
 
49
+ model_name = "ashwinR/CodeExplainer"
50
 
51
  tokenizer = AutoTokenizer.from_pretrained(model_name, padding=True)
52