Spaces:
Runtime error
Runtime error
fix readme
Browse files
README.md
CHANGED
|
@@ -17,11 +17,12 @@ pinned: false
|
|
| 17 |
CodeBLEU from [CodeXGLUE](https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-to-code-trans/evaluator)
|
| 18 |
and from article [CodeBLEU: a Method for Automatic Evaluation of Code Synthesis](https://arxiv.org/abs/2009.10297)
|
| 19 |
|
| 20 |
-
NOTE: currently works on Linux machines only due to dependency
|
| 21 |
|
| 22 |
## How to Use
|
| 23 |
|
| 24 |
```python
|
|
|
|
| 25 |
src = 'class AcidicSwampOoze(MinionCard):§ def __init__(self):§ super().__init__("Acidic Swamp Ooze", 2, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, battlecry=Battlecry(Destroy(), WeaponSelector(EnemyPlayer())))§§ def create_minion(self, player):§ return Minion(3, 2)§'
|
| 26 |
tgt = 'class AcidSwampOoze(MinionCard):§ def __init__(self):§ super().__init__("Acidic Swamp Ooze", 2, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, battlecry=Battlecry(Destroy(), WeaponSelector(EnemyPlayer())))§§ def create_minion(self, player):§ return Minion(3, 2)§'
|
| 27 |
src = src.replace("§","\n")
|
|
|
|
| 17 |
CodeBLEU from [CodeXGLUE](https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-to-code-trans/evaluator)
|
| 18 |
and from article [CodeBLEU: a Method for Automatic Evaluation of Code Synthesis](https://arxiv.org/abs/2009.10297)
|
| 19 |
|
| 20 |
+
NOTE: currently works on Linux machines only due to dependency from languages .so
|
| 21 |
|
| 22 |
## How to Use
|
| 23 |
|
| 24 |
```python
|
| 25 |
+
module = evaluate.load("dvitel/codebleu")
|
| 26 |
src = 'class AcidicSwampOoze(MinionCard):§ def __init__(self):§ super().__init__("Acidic Swamp Ooze", 2, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, battlecry=Battlecry(Destroy(), WeaponSelector(EnemyPlayer())))§§ def create_minion(self, player):§ return Minion(3, 2)§'
|
| 27 |
tgt = 'class AcidSwampOoze(MinionCard):§ def __init__(self):§ super().__init__("Acidic Swamp Ooze", 2, CHARACTER_CLASS.ALL, CARD_RARITY.COMMON, battlecry=Battlecry(Destroy(), WeaponSelector(EnemyPlayer())))§§ def create_minion(self, player):§ return Minion(3, 2)§'
|
| 28 |
src = src.replace("§","\n")
|