Spaces:
Sleeping
Sleeping
bhaskartripathi
commited on
Commit
•
b3f0412
1
Parent(s):
864289d
Update app.py
Browse files
app.py
CHANGED
@@ -242,16 +242,17 @@ def generate_answer_text_davinci_003(question,openAI_key):
|
|
242 |
# pre-defined questions
|
243 |
questions = [
|
244 |
"what did the study investigate?",
|
|
|
245 |
"what are the methodologies used in this study?",
|
246 |
"what are the data intervals used in this study? Give me the start dates and end dates?",
|
247 |
"what are the main limitations of this study?",
|
248 |
"what are the main shortcomings of this study?",
|
249 |
"what are the main findings of the study?",
|
250 |
"what are the main results of the study?",
|
251 |
-
"what are the input features used in this study?",
|
252 |
-
"what is the dependent variable in this study?",
|
253 |
"what are the main contributions of this study?",
|
254 |
"what is the conclusion of this paper?",
|
|
|
|
|
255 |
]
|
256 |
|
257 |
recommender = SemanticSearch()
|
@@ -259,7 +260,7 @@ recommender = SemanticSearch()
|
|
259 |
title = 'PDF GPT Turbo'
|
260 |
description = """ PDF GPT Turbo allows you to chat with your PDF file using Universal Sentence Encoder and Open AI. It gives hallucination free response than other tools as the embeddings are better than OpenAI. The returned response can even cite the page number in square brackets([]) where the information is located, adding credibility to the responses and helping to locate pertinent information quickly."""
|
261 |
|
262 |
-
with gr.Blocks() as demo:
|
263 |
|
264 |
gr.Markdown(f'<center><h1>{title}</h1></center>')
|
265 |
gr.Markdown(description)
|
@@ -285,7 +286,9 @@ with gr.Blocks() as demo:
|
|
285 |
btn.style(full_width=True)
|
286 |
|
287 |
with gr.Group():
|
288 |
-
chatbot = gr.Chatbot(placeholder="Chat History", label="Chat History", lines=20)
|
|
|
|
|
289 |
|
290 |
# Bind the click event of the button to the question_answer function
|
291 |
btn.click(
|
|
|
242 |
# pre-defined questions
|
243 |
questions = [
|
244 |
"what did the study investigate?",
|
245 |
+
"Summarize the paper",
|
246 |
"what are the methodologies used in this study?",
|
247 |
"what are the data intervals used in this study? Give me the start dates and end dates?",
|
248 |
"what are the main limitations of this study?",
|
249 |
"what are the main shortcomings of this study?",
|
250 |
"what are the main findings of the study?",
|
251 |
"what are the main results of the study?",
|
|
|
|
|
252 |
"what are the main contributions of this study?",
|
253 |
"what is the conclusion of this paper?",
|
254 |
+
"what are the input features used in this study?",
|
255 |
+
"what is the dependent variable in this study?",
|
256 |
]
|
257 |
|
258 |
recommender = SemanticSearch()
|
|
|
260 |
title = 'PDF GPT Turbo'
|
261 |
description = """ PDF GPT Turbo allows you to chat with your PDF file using Universal Sentence Encoder and Open AI. It gives hallucination free response than other tools as the embeddings are better than OpenAI. The returned response can even cite the page number in square brackets([]) where the information is located, adding credibility to the responses and helping to locate pertinent information quickly."""
|
262 |
|
263 |
+
with gr.Blocks(css="""#chatbot { font-size: 14px; min-height: 600px; }""") as demo:
|
264 |
|
265 |
gr.Markdown(f'<center><h1>{title}</h1></center>')
|
266 |
gr.Markdown(description)
|
|
|
286 |
btn.style(full_width=True)
|
287 |
|
288 |
with gr.Group():
|
289 |
+
#chatbot = gr.Chatbot(placeholder="Chat History", label="Chat History", lines=20)
|
290 |
+
chatbot = gr.Chatbot(placeholder="Chat History", label="Chat History", lines=20, elem_id="chatbot")
|
291 |
+
|
292 |
|
293 |
# Bind the click event of the button to the question_answer function
|
294 |
btn.click(
|