Curranj commited on
Commit
936b334
1 Parent(s): 222bfc3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -3,7 +3,7 @@ import openai
3
  import gradio as gr
4
 
5
 
6
-
7
  def gpt3(texts):
8
  openai.api_key = apikeycode
9
 
@@ -24,18 +24,14 @@ def gpt3(texts):
24
 
25
 
26
 
27
- # create a UI using gradio that takes in a text name and a text prompt, which then is displayed back to the user
28
-
29
  def greet( prompt):
30
- txt= (f'''/*Prompt: {prompt}*/ \n --SQL Code:''')
31
  sql = gpt3(txt)
32
  return sql
33
 
34
- #the scrip variable is a string of python code with a sql query in it. execute the code keep the result in a variable
35
-
36
-
37
-
38
 
 
39
  iface = gr.Interface(greet, inputs = ["text"], outputs = "text")
40
  iface.launch()
41
 
 
3
  import gradio as gr
4
 
5
 
6
+ #OpenAi call
7
  def gpt3(texts):
8
  openai.api_key = apikeycode
9
 
 
24
 
25
 
26
 
27
+ # Function to elicit sql response from model
 
28
  def greet( prompt):
29
+ txt= HiddenPrompt
30
  sql = gpt3(txt)
31
  return sql
32
 
 
 
 
 
33
 
34
+ #Code to set up Gradio UI
35
  iface = gr.Interface(greet, inputs = ["text"], outputs = "text")
36
  iface.launch()
37