Spaces:
Sleeping
Sleeping
parvezalmuqtadir
commited on
Commit
•
2f7eb6a
1
Parent(s):
8592a70
Update app.py
Browse files
app.py
CHANGED
@@ -222,23 +222,6 @@ def generate_answer_text_davinci_003(question,openAI_key):
|
|
222 |
answer = generate_text_text_davinci_003(openAI_key, prompt,"text-davinci-003")
|
223 |
return answer
|
224 |
|
225 |
-
# pre-defined questions
|
226 |
-
questions = [
|
227 |
-
"What did the study investigate?",
|
228 |
-
"Can you provide a summary of this paper?",
|
229 |
-
"what are the methodologies used in this study?",
|
230 |
-
"what are the data intervals used in this study? Give me the start dates and end dates?",
|
231 |
-
"what are the main limitations of this study?",
|
232 |
-
"what are the main shortcomings of this study?",
|
233 |
-
"what are the main findings of the study?",
|
234 |
-
"what are the main results of the study?",
|
235 |
-
"what are the main contributions of this study?",
|
236 |
-
"what is the conclusion of this paper?",
|
237 |
-
"what are the input features used in this study?",
|
238 |
-
"what is the dependent variable in this study?",
|
239 |
-
]
|
240 |
-
|
241 |
-
|
242 |
recommender = SemanticSearch()
|
243 |
|
244 |
title = 'PDF GPT Turbo'
|
@@ -257,13 +240,6 @@ with gr.Blocks(css="""#chatbot { font-size: 14px; min-height: 1200; }""") as dem
|
|
257 |
gr.Markdown("<center><h4>OR<h4></center>")
|
258 |
file = gr.File(label='Upload your PDF/ Research Paper / Book here', file_types=['.pdf'])
|
259 |
question = gr.Textbox(label='Enter your question here')
|
260 |
-
gr.Examples(
|
261 |
-
examples = gr.Examples(
|
262 |
-
examples=questions,
|
263 |
-
inputs=question,
|
264 |
-
label="PRE-DEFINED QUESTIONS: Click on a question to auto-fill the input box, then press Enter!"
|
265 |
-
)
|
266 |
-
)
|
267 |
model = gr.Radio([
|
268 |
'gpt-3.5-turbo',
|
269 |
'gpt-3.5-turbo-16k',
|
|
|
222 |
answer = generate_text_text_davinci_003(openAI_key, prompt,"text-davinci-003")
|
223 |
return answer
|
224 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
recommender = SemanticSearch()
|
226 |
|
227 |
title = 'PDF GPT Turbo'
|
|
|
240 |
gr.Markdown("<center><h4>OR<h4></center>")
|
241 |
file = gr.File(label='Upload your PDF/ Research Paper / Book here', file_types=['.pdf'])
|
242 |
question = gr.Textbox(label='Enter your question here')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
model = gr.Radio([
|
244 |
'gpt-3.5-turbo',
|
245 |
'gpt-3.5-turbo-16k',
|