npc0 commited on
Commit
def98d5
·
1 Parent(s): e81588f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -13,7 +13,9 @@ class GUI:
13
  inp.change(self.process, inp, self.out)
14
  demo.launch()
15
 
16
- def process(self, file):
 
 
17
  ch_list = epub2txt(file.name, outputlist=True)
18
  chapter_titles = epub2txt.content_titles
19
  title = epub2txt.title
 
13
  inp.change(self.process, inp, self.out)
14
  demo.launch()
15
 
16
+ def process(self, file, profile: gr.OAuthProfile | None):
17
+ if profile is None:
18
+ return gr.update(value='Login to access the tool.')
19
  ch_list = epub2txt(file.name, outputlist=True)
20
  chapter_titles = epub2txt.content_titles
21
  title = epub2txt.title