SnowFlash383935 commited on
Commit
a4769c6
·
verified ·
1 Parent(s): 0e32057

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -2,8 +2,15 @@ import gradio as gr
2
  import fanl_yp
3
  import zlib
4
 
5
- def greet(path: str):
6
- return "Hello " + name + "!!"
 
 
 
 
 
 
 
7
 
8
- demo = gr.Interface(fn=greet, inputs=["file"], outputs=["text"])
9
  demo.launch()
 
2
  import fanl_yp
3
  import zlib
4
 
5
+ def greet(gameFilePath: str):
6
+ gameFile = open(gameFilePath, "br")
7
+ data = zlib.decompress(gameFile.read())
8
+ gameFile.close()
9
+ game = fanl_yp.decode.decode(data)
10
+ // манипуляции с сохранением...
11
+ output = fanl_yp.encode.encode(game, gameFilePath + "_fixed")
12
+ output.flush()
13
+ return gameFilePath + "_fixed"
14
 
15
+ demo = gr.Interface(fn=greet, inputs=["file"], outputs=["file"])
16
  demo.launch()