Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ nltk.download('all') # or any other packages your project depends on
|
|
| 30 |
openai.api_key = os.getenv('OpenAPI')
|
| 31 |
|
| 32 |
def call_openai_api(prompt):
|
| 33 |
-
max_retries =
|
| 34 |
for attempt in range(max_retries):
|
| 35 |
try:
|
| 36 |
response = openai.ChatCompletion.create(
|
|
@@ -82,7 +82,7 @@ iface = gr.Interface(
|
|
| 82 |
gr.inputs.Textbox(label="User Prompt (Enter a prompt to guide the AI's responses)")
|
| 83 |
],
|
| 84 |
outputs=gr.outputs.Textbox(label="Cognitive Agent Response"),
|
| 85 |
-
title="
|
| 86 |
description="This app extracts knowledge from the uploaded Zip files. Using a Cognitive Agent you can interact with that knowledge."
|
| 87 |
)
|
| 88 |
iface.launch(share=False)
|
|
|
|
| 30 |
openai.api_key = os.getenv('OpenAPI')
|
| 31 |
|
| 32 |
def call_openai_api(prompt):
|
| 33 |
+
max_retries = 5
|
| 34 |
for attempt in range(max_retries):
|
| 35 |
try:
|
| 36 |
response = openai.ChatCompletion.create(
|
|
|
|
| 82 |
gr.inputs.Textbox(label="User Prompt (Enter a prompt to guide the AI's responses)")
|
| 83 |
],
|
| 84 |
outputs=gr.outputs.Textbox(label="Cognitive Agent Response"),
|
| 85 |
+
title="Ask An Expert Proof Of Concept",
|
| 86 |
description="This app extracts knowledge from the uploaded Zip files. Using a Cognitive Agent you can interact with that knowledge."
|
| 87 |
)
|
| 88 |
iface.launch(share=False)
|