Curranj commited on
Commit
1d61262
1 Parent(s): 1223732

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -1,10 +1,7 @@
1
-
2
  import openai
3
  import gradio as gr
4
  import os
5
 
6
-
7
-
8
  #OpenAi call
9
  def gpt3(texts):
10
  openai.api_key = os.environ["Secret"]
@@ -22,9 +19,6 @@ def gpt3(texts):
22
 
23
  return x
24
 
25
-
26
-
27
-
28
  # Function to elicit sql response from model
29
  def greet( prompt):
30
  txt= (f'''/*Prompt: {prompt}*/ \n —-SQL Code:\n''')
@@ -34,5 +28,4 @@ def greet( prompt):
34
 
35
  #Code to set up Gradio UI
36
  iface = gr.Interface(greet, inputs = ["text"], outputs = "text",title="Natural Language to SQL", description="Enter any prompt and get a SQL statement back! For better results, give it more context")
37
- iface.launch()
38
-
 
 
1
  import openai
2
  import gradio as gr
3
  import os
4
 
 
 
5
  #OpenAi call
6
  def gpt3(texts):
7
  openai.api_key = os.environ["Secret"]
 
19
 
20
  return x
21
 
 
 
 
22
  # Function to elicit sql response from model
23
  def greet( prompt):
24
  txt= (f'''/*Prompt: {prompt}*/ \n —-SQL Code:\n''')
 
28
 
29
  #Code to set up Gradio UI
30
  iface = gr.Interface(greet, inputs = ["text"], outputs = "text",title="Natural Language to SQL", description="Enter any prompt and get a SQL statement back! For better results, give it more context")
31
+ iface.launch()