Spaces:
Sleeping
Sleeping
Commit
•
8ade672
1
Parent(s):
f70a455
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,14 @@
|
|
1 |
import os
|
2 |
import openai
|
3 |
import gradio as gr
|
|
|
|
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
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 |
|