Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,11 +3,13 @@ from epub2txt import epub2txt
|
|
| 3 |
|
| 4 |
class GUI:
|
| 5 |
def __init__(self, *args, **kwargs):
|
| 6 |
-
with gr.Blocks(css=".lbtn {float: right;}") as demo:
|
| 7 |
with gr.Row():
|
| 8 |
gr.LoginButton(elem_classes="lbtn")
|
| 9 |
gr.LogoutButton(elem_classes="lbtn")
|
| 10 |
self.out = gr.Markdown().attach_load_event(self.hello, None)
|
|
|
|
|
|
|
| 11 |
demo.launch()
|
| 12 |
|
| 13 |
def process(self, file):
|
|
@@ -25,8 +27,6 @@ class GUI:
|
|
| 25 |
'# ePub summarization tool '
|
| 26 |
'<p style="text-align: center;">Login to access the tool.</p>'
|
| 27 |
)
|
| 28 |
-
inp = gr.File(file_types=['.epub'])
|
| 29 |
-
inp.change(self.process, inp, self.out)
|
| 30 |
return self.greet(profile.name)
|
| 31 |
|
| 32 |
GUI()
|
|
|
|
| 3 |
|
| 4 |
class GUI:
|
| 5 |
def __init__(self, *args, **kwargs):
|
| 6 |
+
with gr.Blocks(css=".lbtn {position: relative; float: right;}") as demo:
|
| 7 |
with gr.Row():
|
| 8 |
gr.LoginButton(elem_classes="lbtn")
|
| 9 |
gr.LogoutButton(elem_classes="lbtn")
|
| 10 |
self.out = gr.Markdown().attach_load_event(self.hello, None)
|
| 11 |
+
inp = gr.File(file_types=['.epub'])
|
| 12 |
+
inp.change(self.process, inp, self.out)
|
| 13 |
demo.launch()
|
| 14 |
|
| 15 |
def process(self, file):
|
|
|
|
| 27 |
'# ePub summarization tool '
|
| 28 |
'<p style="text-align: center;">Login to access the tool.</p>'
|
| 29 |
)
|
|
|
|
|
|
|
| 30 |
return self.greet(profile.name)
|
| 31 |
|
| 32 |
GUI()
|