Spaces:
Sleeping
Sleeping
fix 11
Browse files
app.py
CHANGED
@@ -107,29 +107,30 @@ demo = gr.ChatInterface(
|
|
107 |
)
|
108 |
"""
|
109 |
|
110 |
-
with gr.
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
minimum=
|
124 |
-
maximum=
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
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 |
|