Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ openai.api_key = os.environ["AI_API_KEY"]
|
|
| 6 |
|
| 7 |
def make_dua(prompt):
|
| 8 |
response = openai.Completion.create(
|
| 9 |
-
engine="
|
| 10 |
prompt=" Turn this prompt |: " + prompt + " | into a Splunk query ",
|
| 11 |
max_tokens=1024,
|
| 12 |
n=1,
|
|
@@ -16,9 +16,9 @@ def make_dua(prompt):
|
|
| 16 |
return response
|
| 17 |
|
| 18 |
iface = gr.Interface(make_dua,
|
| 19 |
-
gr.inputs.Textbox(lines=5, default="
|
| 20 |
gr.outputs.Textbox(),
|
| 21 |
-
title="
|
| 22 |
-
description="Get a
|
| 23 |
|
| 24 |
iface.launch()
|
|
|
|
| 6 |
|
| 7 |
def make_dua(prompt):
|
| 8 |
response = openai.Completion.create(
|
| 9 |
+
engine="gpt-4",
|
| 10 |
prompt=" Turn this prompt |: " + prompt + " | into a Splunk query ",
|
| 11 |
max_tokens=1024,
|
| 12 |
n=1,
|
|
|
|
| 16 |
return response
|
| 17 |
|
| 18 |
iface = gr.Interface(make_dua,
|
| 19 |
+
gr.inputs.Textbox(lines=5, default="Find events with users who keep using the incorrect password?"),
|
| 20 |
gr.outputs.Textbox(),
|
| 21 |
+
title="Splunk Assistanr",
|
| 22 |
+
description="Get a recomended splunk query for any of your problens.")
|
| 23 |
|
| 24 |
iface.launch()
|