Spaces:
Runtime error
Runtime error
Add user feedback
Browse files
app.py
CHANGED
@@ -251,6 +251,14 @@ config firewall policy
|
|
251 |
end\n
|
252 |
"""
|
253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
if __name__ == "__main__":
|
255 |
args = parse_args()
|
256 |
tokenizer = AutoTokenizer.from_pretrained("lliu01/fortios_one_config")
|
@@ -275,6 +283,8 @@ if __name__ == "__main__":
|
|
275 |
gr.Textbox(sys_prompt, label="System Prompt"),
|
276 |
gr.Slider(0, 1, 0.5, label="Temperature"),
|
277 |
gr.Slider(100, 2048, 1024, label="Max Tokens"),
|
|
|
|
|
278 |
],
|
279 |
examples=[
|
280 |
["Allow all traffic from any source IP address and any source interface 'port10' to any destination IP address and any destination interface 'port9'. This policy will be applied at all times (always) and will allow all services. Additionally, this policy will enable UTM features, use proxy-based inspection mode, and use an SSL-SSH profile named 'deep-custom'. Finally, this policy will also enable source NAT."],
|
|
|
251 |
end\n
|
252 |
"""
|
253 |
|
254 |
+
def submit_correction(original_answer, corrected_answer):
|
255 |
+
# No operation function for the submit button click event
|
256 |
+
return "Correction submitted!"
|
257 |
+
|
258 |
+
correct_answer = gr.Textbox(label="Correct Answer", placeholder="Enter the correct answer if the provided one is wrong")
|
259 |
+
submit_btn = gr.Button("Submit Correction")
|
260 |
+
submit_btn.click(fn=submit_correction, inputs=[chatbot, correct_answer], outputs="text")
|
261 |
+
|
262 |
if __name__ == "__main__":
|
263 |
args = parse_args()
|
264 |
tokenizer = AutoTokenizer.from_pretrained("lliu01/fortios_one_config")
|
|
|
283 |
gr.Textbox(sys_prompt, label="System Prompt"),
|
284 |
gr.Slider(0, 1, 0.5, label="Temperature"),
|
285 |
gr.Slider(100, 2048, 1024, label="Max Tokens"),
|
286 |
+
correct_answer,
|
287 |
+
submit_btn,
|
288 |
],
|
289 |
examples=[
|
290 |
["Allow all traffic from any source IP address and any source interface 'port10' to any destination IP address and any destination interface 'port9'. This policy will be applied at all times (always) and will allow all services. Additionally, this policy will enable UTM features, use proxy-based inspection mode, and use an SSL-SSH profile named 'deep-custom'. Finally, this policy will also enable source NAT."],
|