Sebbe33 commited on
Commit
f3fa4d5
·
verified ·
1 Parent(s): 831828a

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -42,7 +42,6 @@ def respond(
42
  max_results,
43
  ):
44
  # Query generieren und Studien abrufen
45
- query = generate_query(message)
46
  study_summaries = fetch_arxiv_summary(query, sort_by, sort_order, max_results)
47
  study_info = "\n".join(study_summaries)
48
 
@@ -72,9 +71,8 @@ def respond(
72
  # Gradio-Interface mit zusätzlichen Eingaben
73
 
74
  with gr.Blocks() as demo:
75
- gr.Markdown("""
76
- ### Helloooooo
77
- This chatbot uses AI to answer your questions and retrieve relevant studies from the arXiv database.
78
  Enter your specific query in the field below, and the bot will provide you with studies including the title, link, and summary.
79
  """)
80
  query_input = gr.Textbox(value="", label="Query", placeholder="Enter your specific search term.")
@@ -82,12 +80,9 @@ Enter your specific query in the field below, and the bot will provide you with
82
  respond,
83
  additional_inputs=[
84
  gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
85
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
86
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
87
- gr.Slider(minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p (nucleus sampling)"),
88
- gr.Dropdown(label="Sortieren nach", choices=["relevance", "lastUpdatedDate", "submittedDate"], value="relevance"),
89
- gr.Dropdown(label="Sortierreihenfolge", choices=["ascending", "descending"], value="descending"),
90
- gr.Slider(label="Maximale Ergebnisse", minimum=1, maximum=50, value=20, step=1),
91
  ],
92
  )
93
 
 
42
  max_results,
43
  ):
44
  # Query generieren und Studien abrufen
 
45
  study_summaries = fetch_arxiv_summary(query, sort_by, sort_order, max_results)
46
  study_info = "\n".join(study_summaries)
47
 
 
71
  # Gradio-Interface mit zusätzlichen Eingaben
72
 
73
  with gr.Blocks() as demo:
74
+ gr.Markdown("""Helloooooo
75
+ This chatbot uses AI to answer your questions and retrieve relevant studies from the arXiv database.
 
76
  Enter your specific query in the field below, and the bot will provide you with studies including the title, link, and summary.
77
  """)
78
  query_input = gr.Textbox(value="", label="Query", placeholder="Enter your specific search term.")
 
80
  respond,
81
  additional_inputs=[
82
  gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
83
+ gr.Dropdown(label="Sortby", choices=["relevance", "lastUpdatedDate", "submittedDate"], value="relevance"),
84
+ gr.Dropdown(label="Sort", choices=["ascending", "descending"], value="descending"),
85
+ gr.Slider(label="MaxEntries", minimum=1, maximum=50, value=20, step=1),
 
 
 
86
  ],
87
  )
88