Kskddkdj commited on
Commit
02abc7a
·
verified ·
1 Parent(s): 349288f

Yapay zeka oluştur

Browse files

Bütün bilgilere sahip olsun

Files changed (1) hide show
  1. Ai +14 -0
Ai ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import openai
2
+ import gradio as gr
3
+
4
+ openai.api_key = "BURAYA API KEYİNİ EKLE"
5
+
6
+ def akbaba_ai_soru(soru):
7
+ response = openai.ChatCompletion.create(
8
+ model="gpt-4",
9
+ messages=[{"role": "system", "content": "Akbaba AI sistem promptu buraya yapıştır."},
10
+ {"role": "user", "content": soru}]
11
+ )
12
+ return response['choices'][0]['message']['content']
13
+
14
+ gr.Interface(fn=akbaba_ai_soru, inputs="text", outputs="text", title="Akbaba AI").launch()