vincentmin commited on
Commit
d32e198
·
1 Parent(s): 076a043

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -84,7 +84,7 @@ def get_data(category: str, lookback_days: float, user_query: str):
84
  print(relevant_docs[0].metadata)
85
  articles = ""
86
  for doc in relevant_docs:
87
- articles += f"**Title: {doc.metadata['title']}**\n\nAuthors: {doc.metadata['authors']}\n\nAbstract: {doc.page_content}\n\nID: {doc.id}\n\n"
88
  output = stuff_chain({"input_documents": relevant_docs, "context": user_query})
89
  output_text = output["output_text"].split("<|end|>")[0]
90
  print("LLM output:", output_text)
@@ -107,7 +107,7 @@ with gr.Blocks() as demo:
107
  category = gr.Textbox(value="hep-th", label="Which category to search through. See https://arxiv.org/category_taxonomy for possible values.")
108
 
109
  with gr.Box():
110
- input_text = gr.Textbox(placeholder="Describe your field of research in a few words")
111
  gr.Examples(
112
  [["Supersymmetric Conformal Field Theory"], ["Black hole information paradox"]],
113
  input_text,
 
84
  print(relevant_docs[0].metadata)
85
  articles = ""
86
  for doc in relevant_docs:
87
+ articles += f"**Title: {doc.metadata['title']}**\n\nAuthors: {doc.metadata['authors']}\n\nAbstract: {doc.page_content}\n\nID: {doc.metadata['id']}\n\n"
88
  output = stuff_chain({"input_documents": relevant_docs, "context": user_query})
89
  output_text = output["output_text"].split("<|end|>")[0]
90
  print("LLM output:", output_text)
 
107
  category = gr.Textbox(value="hep-th", label="Which category to search through. See https://arxiv.org/category_taxonomy for possible values.")
108
 
109
  with gr.Box():
110
+ input_text = gr.Textbox(placeholder="Describe your field of research in a few words", container=False)
111
  gr.Examples(
112
  [["Supersymmetric Conformal Field Theory"], ["Black hole information paradox"]],
113
  input_text,