jh000107 commited on
Commit
11cca34
·
1 Parent(s): 88c375a

removing key section

Browse files
Files changed (1) hide show
  1. app.py +0 -10
app.py CHANGED
@@ -294,13 +294,6 @@ def get_completion(conversation, model="gpt-4-1106-preview"):
294
 
295
  return response.choices[0].message.content, fig
296
 
297
- def set_key(key):
298
- with open("_.env", "w") as file:
299
- file.write(f"OPENAI_API_KEY={key}")
300
-
301
- load_dotenv(find_dotenv("_.env"), override=True)
302
- return
303
-
304
  import gradio as gr
305
 
306
  with gr.Blocks() as gpt_analysis:
@@ -309,9 +302,6 @@ with gr.Blocks() as gpt_analysis:
309
  "This is a custom GPT model designed to provide \
310
  a report on overall sentiment flow of the conversation on the \
311
  volunteer's perspective.<br /> Click on them and submit them to the model to see how it works.")
312
- api_key = gr.Textbox(label="Key", lines=1)
313
- btn_key = gr.Button(value="Submit Key")
314
- btn_key.click(set_key, inputs=api_key)
315
  conversation = gr.Textbox(label="Input", lines=2)
316
  btn = gr.Button(value="Submit")
317
  with gr.Row():
 
294
 
295
  return response.choices[0].message.content, fig
296
 
 
 
 
 
 
 
 
297
  import gradio as gr
298
 
299
  with gr.Blocks() as gpt_analysis:
 
302
  "This is a custom GPT model designed to provide \
303
  a report on overall sentiment flow of the conversation on the \
304
  volunteer's perspective.<br /> Click on them and submit them to the model to see how it works.")
 
 
 
305
  conversation = gr.Textbox(label="Input", lines=2)
306
  btn = gr.Button(value="Submit")
307
  with gr.Row():