Refactor the project

#5
by thomasmz1 - opened
Files changed (3) hide show
  1. README.md +2 -2
  2. app.py +2 -2
  3. requirements.txt +1 -1
README.md CHANGED
@@ -4,11 +4,11 @@ emoji: 🏢
4
  colorFrom: indigo
5
  colorTo: green
6
  sdk: gradio
7
- sdk_version: 4.36.1
8
  app_file: app.py
9
  pinned: false
10
  license: afl-3.0
11
  duplicated_from: bhaskartripathi/pdfChatter
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
4
  colorFrom: indigo
5
  colorTo: green
6
  sdk: gradio
7
+ sdk_version: 3.20.1
8
  app_file: app.py
9
  pinned: false
10
  license: afl-3.0
11
  duplicated_from: bhaskartripathi/pdfChatter
12
  ---
13
 
14
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import urllib.request
2
- import fitz
3
  import re
4
  import numpy as np
5
  import tensorflow_hub as hub
@@ -247,7 +247,7 @@ with gr.Blocks(css="""#chatbot { font-size: 14px; min-height: 1200; }""") as dem
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
  with gr.Accordion("API Key"):
250
- openAI_key = gr.Textbox(label='Enter your OpenAI API key here')
251
  url = gr.Textbox(label='Enter PDF URL here (Example: https://arxiv.org/pdf/1706.03762.pdf )')
252
  gr.Markdown("<center><h4>OR<h4></center>")
253
  file = gr.File(label='Upload your PDF/ Research Paper / Book here', file_types=['.pdf'])
 
1
  import urllib.request
2
+ import fitz
3
  import re
4
  import numpy as np
5
  import tensorflow_hub as hub
 
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
  with gr.Accordion("API Key"):
250
+ openAI_key = gr.Textbox(label='Enter your OpenAI API key here', password=True)
251
  url = gr.Textbox(label='Enter PDF URL here (Example: https://arxiv.org/pdf/1706.03762.pdf )')
252
  gr.Markdown("<center><h4>OR<h4></center>")
253
  file = gr.File(label='Upload your PDF/ Research Paper / Book here', file_types=['.pdf'])
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- gradio
2
  PyMuPDF
3
  numpy
4
  scikit-learn
 
1
+ gradio
2
  PyMuPDF
3
  numpy
4
  scikit-learn