1.7.23
Browse files
app.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
import os
|
| 2 |
from dotenv import load_dotenv
|
| 3 |
load_dotenv()
|
|
|
|
| 4 |
import openai
|
| 5 |
import gradio
|
| 6 |
|
|
|
|
| 7 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
| 8 |
|
| 9 |
messages = [
|
|
@@ -17,5 +19,6 @@ def CustomChatGPT(user_input):
|
|
| 17 |
messages.append({"role": "assistant", "content": ChatGPT_reply})
|
| 18 |
return ChatGPT_reply
|
| 19 |
|
| 20 |
-
demo = gradio.Interface(fn=CustomChatGPT, inputs="text", outputs="text", title="CodeGPT")
|
|
|
|
| 21 |
demo.launch(share=True)
|
|
|
|
| 1 |
import os
|
| 2 |
from dotenv import load_dotenv
|
| 3 |
load_dotenv()
|
| 4 |
+
|
| 5 |
import openai
|
| 6 |
import gradio
|
| 7 |
|
| 8 |
+
|
| 9 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
| 10 |
|
| 11 |
messages = [
|
|
|
|
| 19 |
messages.append({"role": "assistant", "content": ChatGPT_reply})
|
| 20 |
return ChatGPT_reply
|
| 21 |
|
| 22 |
+
demo = gradio.Interface(fn=CustomChatGPT, inputs="text", outputs="text", title="CodeGPT",description="CodeGPT is an coding assistant based on GPT-3.5 Turbo for competitive programming, data structures, algorithms, and general programming tasks. This model is accessed using the official OpenAI API, allowing you to extract text responses related to coding queries.CodeGPT is built using the powerful GPT-3.5 Turbo model provided by OpenAI. We would like to express our gratitude to OpenAI for their contributions to the field of natural language processing and machine learning.")
|
| 23 |
+
|
| 24 |
demo.launch(share=True)
|