curry tang
commited on
Commit
·
2c5de2c
1
Parent(s):
68cf8d3
update
Browse files
app.py
CHANGED
@@ -242,7 +242,7 @@ with gr.Blocks() as app:
|
|
242 |
code_type = gr.Dropdown(
|
243 |
label='代码类型',
|
244 |
choices=['Javascript', 'Typescript', 'Python', "GO", 'C++', 'PHP', 'Java', 'C#', "C", "Kotlin", "Bash"],
|
245 |
-
value='
|
246 |
)
|
247 |
code = gr.Textbox(label='代码', lines=10, value=None)
|
248 |
with gr.Row(variant='panel'):
|
|
|
242 |
code_type = gr.Dropdown(
|
243 |
label='代码类型',
|
244 |
choices=['Javascript', 'Typescript', 'Python', "GO", 'C++', 'PHP', 'Java', 'C#', "C", "Kotlin", "Bash"],
|
245 |
+
value='Typescript',
|
246 |
)
|
247 |
code = gr.Textbox(label='代码', lines=10, value=None)
|
248 |
with gr.Row(variant='panel'):
|
utils.py
CHANGED
@@ -3,7 +3,7 @@ from PIL import Image
|
|
3 |
import io
|
4 |
|
5 |
|
6 |
-
def convert_image_to_base64(file):
|
7 |
with Image.open(file.path) as img:
|
8 |
buffer = io.BytesIO()
|
9 |
img = img.convert('RGB')
|
|
|
3 |
import io
|
4 |
|
5 |
|
6 |
+
def convert_image_to_base64(file) -> str:
|
7 |
with Image.open(file.path) as img:
|
8 |
buffer = io.BytesIO()
|
9 |
img = img.convert('RGB')
|