fix output bug
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
def tokenize(
|
4 |
split = {'(', ')', '{', '}', '[', ']', ',', ':', '+', '-', '*', '/', '%', '=', '\n'}
|
5 |
DFA_table = {
|
6 |
-1: {'any': -1},
|
@@ -27,7 +27,6 @@ def tokenize(python_code: str):
|
|
27 |
finals = (17, 18)
|
28 |
tokens = []
|
29 |
cursor = 0
|
30 |
-
python_code=buffer
|
31 |
while cursor < len(buffer):
|
32 |
state = 0
|
33 |
temp = ''
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
def tokenize(buffer: str):
|
4 |
split = {'(', ')', '{', '}', '[', ']', ',', ':', '+', '-', '*', '/', '%', '=', '\n'}
|
5 |
DFA_table = {
|
6 |
-1: {'any': -1},
|
|
|
27 |
finals = (17, 18)
|
28 |
tokens = []
|
29 |
cursor = 0
|
|
|
30 |
while cursor < len(buffer):
|
31 |
state = 0
|
32 |
temp = ''
|