amitpuri commited on
Commit
cb5be95
1 Parent(s): 4d91c16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,6 +4,7 @@ import gradio as gr
4
  import openai
5
 
6
  #from dotenv import load_dotenv
 
7
  #load_dotenv()
8
 
9
  llm_api_options = ["OpenAI API","Azure OpenAI API","Google PaLM API", "Llama 2"]
@@ -41,7 +42,8 @@ def openai_text_completion(prompt: str, model: str):
41
  def test_handler(optionSelection, prompt: str = TEST_MESSAGE, model: str ="gpt-4"):
42
  match optionSelection:
43
  case "OpenAI API":
44
- openai_text_completion(prompt,model)
 
45
  case "Azure OpenAI API":
46
  return "", ""
47
  case "Google PaLM API":
 
4
  import openai
5
 
6
  #from dotenv import load_dotenv
7
+
8
  #load_dotenv()
9
 
10
  llm_api_options = ["OpenAI API","Azure OpenAI API","Google PaLM API", "Llama 2"]
 
42
  def test_handler(optionSelection, prompt: str = TEST_MESSAGE, model: str ="gpt-4"):
43
  match optionSelection:
44
  case "OpenAI API":
45
+ message, response = openai_text_completion(prompt,model)
46
+ return message, response
47
  case "Azure OpenAI API":
48
  return "", ""
49
  case "Google PaLM API":