bhaskartripathi commited on
Commit
2092920
1 Parent(s): f54483f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -231,7 +231,9 @@ questions = [
231
  "what is the dependent variable in this study?",
232
  ]
233
 
234
-
 
 
235
  recommender = SemanticSearch()
236
 
237
  title = 'PDF GPT Turbo'
@@ -246,7 +248,7 @@ with gr.Blocks(css="""#chatbot { font-size: 14px; min-height: 1200; }""") as dem
246
 
247
  with gr.Group():
248
  gr.Markdown(f'<p style="text-align:center">Get your Open AI API key <a href="https://platform.openai.com/account/api-keys">here</a></p>')
249
- openAI_key = gr.Textbox(label='Enter your OpenAI API key here', password=True)
250
  url = gr.Textbox(label='Enter PDF URL here (Example: https://arxiv.org/pdf/1706.06722.pdf )')
251
  gr.Markdown("<center><h4>OR<h4></center>")
252
  file = gr.File(label='Upload your PDF/ Research Paper / Book here', file_types=['.pdf'])
 
231
  "what is the dependent variable in this study?",
232
  ]
233
 
234
+ def mask_key(key):
235
+ return '*' * len(key)
236
+
237
  recommender = SemanticSearch()
238
 
239
  title = 'PDF GPT Turbo'
 
248
 
249
  with gr.Group():
250
  gr.Markdown(f'<p style="text-align:center">Get your Open AI API key <a href="https://platform.openai.com/account/api-keys">here</a></p>')
251
+ openAI_key = gr.Textbox(label='Enter your OpenAI API key here', preprocess=mask_key)
252
  url = gr.Textbox(label='Enter PDF URL here (Example: https://arxiv.org/pdf/1706.06722.pdf )')
253
  gr.Markdown("<center><h4>OR<h4></center>")
254
  file = gr.File(label='Upload your PDF/ Research Paper / Book here', file_types=['.pdf'])