sailfish commited on
Commit
b50b796
·
1 Parent(s): 06c9a85
Files changed (1) hide show
  1. app.py +24 -23
app.py CHANGED
@@ -107,29 +107,30 @@ demo = gr.ChatInterface(
107
  )
108
  """
109
 
110
- with gr.Tab("Generate Email"):
111
- Query = gr.Textbox(label="Query")
112
- generate_button = gr.Button("Ask Query")
113
- output = gr.Textbox(label="Generated Answer", lines=10)
114
-
115
- generate_button.click(generate_text,
116
- #inputs=[industry, recipient_role, company_details],
117
- inputs=[
118
- Query,
119
- gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
120
- gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
121
- gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
122
- gr.Slider(
123
- minimum=0.1,
124
- maximum=1.0,
125
- value=0.95,
126
- step=0.05,
127
- label="Top-p (nucleus sampling)",
128
- ),
129
- ],
130
-
131
-
132
- outputs=output)
 
133
 
134
 
135
 
 
107
  )
108
  """
109
 
110
+ with gr.Blocks() as demo:
111
+ gr.Markdown("Q&A App")
112
+
113
+ with gr.Tab("Q&A"):
114
+ Query = gr.Textbox(label="Query")
115
+ generate_button = gr.Button("Ask Query")
116
+ output = gr.Textbox(label="Generated Answer", lines=10)
117
+
118
+ generate_button.click(generate_text,
119
+ #inputs=[industry, recipient_role, company_details],
120
+ inputs=[
121
+ Query,
122
+ gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
123
+ gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
124
+ gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
125
+ gr.Slider(
126
+ minimum=0.1,
127
+ maximum=1.0,
128
+ value=0.95,
129
+ step=0.05,
130
+ label="Top-p (nucleus sampling)",
131
+ ),
132
+ ],
133
+ outputs=output)
134
 
135
 
136