Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import openai
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
-
class chatgpt:
|
| 5 |
|
| 6 |
def __init__(self):
|
| 7 |
self.model_id = "gpt-3.5-turbo"
|
|
@@ -27,13 +27,13 @@ class chatgpt:
|
|
| 27 |
def Clean(self):
|
| 28 |
self.history.clear()
|
| 29 |
self.conversation.clear()
|
| 30 |
-
|
| 31 |
# User input
|
| 32 |
block = gr.Blocks()
|
| 33 |
chatgpt = chatgpt()
|
| 34 |
|
| 35 |
with block:
|
| 36 |
-
gr.Markdown("""<h1><center
|
| 37 |
<p><center>ChatGPT-Assistant is a chatbot that uses the gpt-3.5-turbo model</center></p>
|
| 38 |
""")
|
| 39 |
api_key = gr.Textbox(type="password", label="Enter your OpenAI API key here")
|
|
@@ -56,4 +56,4 @@ with block:
|
|
| 56 |
inputs=message
|
| 57 |
)
|
| 58 |
|
| 59 |
-
block.launch(debug=True)
|
|
|
|
| 1 |
import openai
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
+
class chatgpt:
|
| 5 |
|
| 6 |
def __init__(self):
|
| 7 |
self.model_id = "gpt-3.5-turbo"
|
|
|
|
| 27 |
def Clean(self):
|
| 28 |
self.history.clear()
|
| 29 |
self.conversation.clear()
|
| 30 |
+
|
| 31 |
# User input
|
| 32 |
block = gr.Blocks()
|
| 33 |
chatgpt = chatgpt()
|
| 34 |
|
| 35 |
with block:
|
| 36 |
+
gr.Markdown("""<h1><center>🤖 ChatGPT-Assistant 🐍</center></h1>
|
| 37 |
<p><center>ChatGPT-Assistant is a chatbot that uses the gpt-3.5-turbo model</center></p>
|
| 38 |
""")
|
| 39 |
api_key = gr.Textbox(type="password", label="Enter your OpenAI API key here")
|
|
|
|
| 56 |
inputs=message
|
| 57 |
)
|
| 58 |
|
| 59 |
+
block.launch(debug=True)
|