pedromsfaria commited on
Commit
8ade672
1 Parent(s): f70a455

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -1,10 +1,14 @@
1
  import os
2
  import openai
3
  import gradio as gr
 
 
4
 
5
-
6
- #if you have OpenAI API key as an environment variable, enable the below
7
- #openai.api_key = os.getenv("OPENAI_API_KEY")
 
 
8
 
9
  #if you have OpenAI API key as a string, enable the below
10
  openai.api_key = os.environ['OPENAI_API_KEY']
@@ -76,6 +80,8 @@ def chatgpt_clone(input, history):
76
  return history, history
77
 
78
 
 
 
79
  block = gr.Blocks(css=".gradio-container {background: url('file=fundo.jpg')}")
80
 
81
 
 
1
  import os
2
  import openai
3
  import gradio as gr
4
+ import tkinter as tk
5
+ from tkinter import simpledialog
6
 
7
+ # Create a popup dialog to ask a question at the beginning
8
+ ROOT = tk.Tk()
9
+ ROOT.withdraw()
10
+ user_input = simpledialog.askstring(title="Truebot AI",
11
+ prompt="How can I assist you today?")
12
 
13
  #if you have OpenAI API key as a string, enable the below
14
  openai.api_key = os.environ['OPENAI_API_KEY']
 
80
  return history, history
81
 
82
 
83
+
84
+
85
  block = gr.Blocks(css=".gradio-container {background: url('file=fundo.jpg')}")
86
 
87