Nikhitha2310 commited on
Commit
3aa3370
·
verified ·
1 Parent(s): 0b1d444

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import streamlit as st
3
+ import openai
4
+ os.environ['OPENAI_API_KEY']='sk-proj-uHasdgbriPPlFMm99ZtJT3BlbkFJOl231YfdxCSNmQjVEpMX'
5
+ response=openai.chat.completions.create(
6
+ model="gpt-3.5-turbo",
7
+ messages=[
8
+ {"role": "system", "content": "Hello!, How can I assist you"},
9
+ {'role':'user','content':"Tell me about India"}
10
+ ]
11
+ )
12
+ st.write(response.choices[0].message.content)