matthoffner commited on
Commit
7475b39
Β·
1 Parent(s): fd9ea07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -3
app.py CHANGED
@@ -13,7 +13,7 @@ PromptHelper.compact_text_chunks = compact_text_chunks
13
 
14
  with gr.Blocks(css="") as demo:
15
  with gr.Box():
16
- gr.Markdown("<h1 style='font-size: 48px; text-align: center;'>πŸ“š LLaMa Difu πŸ““</h1>")
17
  gr.Markdown("<h3 style='text-align: center;'>πŸ¦™ Local LLM Do It For U πŸ¦™</h3>")
18
 
19
  chat_context = gr.State([])
@@ -41,7 +41,19 @@ with gr.Blocks(css="") as demo:
41
  num_children = gr.Slider(2, 100, 10, step=1, label="num_children", interactive=False, show_label=True)
42
  max_keywords_per_chunk = gr.Slider(1, 100, 10, step=1, label="max_keywords_per_chunk", interactive=False, show_label=True)
43
 
44
-
 
 
 
 
 
 
 
 
 
 
 
 
45
  chat_input.submit(chat_ai, [index_select, chat_input, prompt_tmpl, refine_tmpl, sim_k, chat_tone, chat_context, chatbot, search_options_checkbox], [chat_context, chatbot])
46
  chat_input.submit(reset_textbox, [], [chat_input])
47
  chat_submit_btn.click(chat_ai, [index_select, chat_input, prompt_tmpl, refine_tmpl, sim_k, chat_tone, chat_context, chatbot, search_options_checkbox], [chat_context, chatbot])
@@ -56,5 +68,5 @@ with gr.Blocks(css="") as demo:
56
 
57
 
58
  if __name__ == "__main__":
59
- demo.title = "LLaMa Do It For U"
60
  demo.queue().launch()
 
13
 
14
  with gr.Blocks(css="") as demo:
15
  with gr.Box():
16
+ gr.Markdown("<h1 style='font-size: 48px; text-align: center;'>πŸͺ„ WizardLM PDF Chat πŸ““</h1>")
17
  gr.Markdown("<h3 style='text-align: center;'>πŸ¦™ Local LLM Do It For U πŸ¦™</h3>")
18
 
19
  chat_context = gr.State([])
 
41
  num_children = gr.Slider(2, 100, 10, step=1, label="num_children", interactive=False, show_label=True)
42
  max_keywords_per_chunk = gr.Slider(1, 100, 10, step=1, label="max_keywords_per_chunk", interactive=False, show_label=True)
43
 
44
+ with gr.Tab("Search"):
45
+ with gr.Row():
46
+ with gr.Column(scale=3):
47
+ search_options_checkbox = gr.CheckboxGroup(label="APIs", choices=["πŸ“š Google", "🏑 Porch", "Your API Here"])
48
+ chatbot = gr.Chatbot()
49
+ with gr.Row():
50
+ with gr.Column(min_width=50, scale=1):
51
+ chat_empty_btn = gr.Button("🧹", variant="secondary")
52
+ with gr.Column(scale=12):
53
+ chat_input = gr.Textbox(show_label=False, placeholder="Enter text...").style(container=False)
54
+ with gr.Column(min_width=50, scale=1):
55
+ chat_submit_btn = gr.Button("πŸš€", variant="primary")
56
+
57
  chat_input.submit(chat_ai, [index_select, chat_input, prompt_tmpl, refine_tmpl, sim_k, chat_tone, chat_context, chatbot, search_options_checkbox], [chat_context, chatbot])
58
  chat_input.submit(reset_textbox, [], [chat_input])
59
  chat_submit_btn.click(chat_ai, [index_select, chat_input, prompt_tmpl, refine_tmpl, sim_k, chat_tone, chat_context, chatbot, search_options_checkbox], [chat_context, chatbot])
 
68
 
69
 
70
  if __name__ == "__main__":
71
+ demo.title = "WizardLM Chat"
72
  demo.queue().launch()