SwayamAK commited on
Commit
1f92f29
·
2 Parent(s): 418dbaa4daef0f

Merge branch 'main' of https://huggingface.co/spaces/SwayamAK/CodeGPT

Browse files
Files changed (3) hide show
  1. .env +0 -1
  2. README.md +3 -1
  3. app.py +4 -0
.env DELETED
@@ -1 +0,0 @@
1
- OPENAI_API_KEY="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"
 
 
README.md CHANGED
@@ -7,7 +7,9 @@ sdk: gradio
7
  sdk_version: 3.35.2
8
  app_file: app.py
9
  pinned: false
10
- license: unknown
11
  ---
 
12
 
 
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
7
  sdk_version: 3.35.2
8
  app_file: app.py
9
  pinned: false
 
10
  ---
11
+ CodeGPT is an GPT model based on GPT-3.5 Turbo that serves as a coding assistant 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.
12
 
13
+
14
+ 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.
15
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import os
 
2
  from dotenv import load_dotenv
3
  load_dotenv()
4
 
@@ -17,8 +18,11 @@ def CustomChatGPT(user_input):
17
  response = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=messages)
18
  ChatGPT_reply = response["choices"][0]["message"]["content"]
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)
 
 
1
  import os
2
+
3
  from dotenv import load_dotenv
4
  load_dotenv()
5
 
 
18
  response = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=messages)
19
  ChatGPT_reply = response["choices"][0]["message"]["content"]
20
  messages.append({"role": "assistant", "content": ChatGPT_reply})
21
+
22
  return ChatGPT_reply
23
 
24
+
25
  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.")
26
 
27
  demo.launch(share=True)
28
+