Jether commited on
Commit
f2095ff
·
verified ·
1 Parent(s): 1c812a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -1
app.py CHANGED
@@ -42,11 +42,14 @@ def respond(
42
 
43
  """
44
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
 
 
 
45
  """
46
  demo = gr.ChatInterface(
47
  respond,
48
  additional_inputs=[
49
- gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
50
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
51
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
52
  gr.Slider(
@@ -57,6 +60,18 @@ demo = gr.ChatInterface(
57
  label="Top-p (nucleus sampling)",
58
  ),
59
  ],
 
 
 
 
 
 
 
 
 
 
 
 
60
  )
61
 
62
 
 
42
 
43
  """
44
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
45
+ """
46
+
47
+
48
  """
49
  demo = gr.ChatInterface(
50
  respond,
51
  additional_inputs=[
52
+ gr.Textbox(value="You are chatbot for PGP clients.", label="System message"),
53
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
54
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
55
  gr.Slider(
 
60
  label="Top-p (nucleus sampling)",
61
  ),
62
  ],
63
+
64
+ )
65
+
66
+ """
67
+
68
+ demo = gr.ChatInterface(
69
+ answer,
70
+ type="messages",
71
+ title="PGP Chatbot",
72
+ description="You are chatbot for PGP clients. Your user can upload any text, document or pdf files and ask questions about them!",
73
+ textbox=gr.MultimodalTextbox(file_types=[".docx", ".doc", ".pdf", ".txt"]),
74
+ multimodal=True
75
  )
76
 
77