Yapay zeka oluştur
Browse filesBütün bilgilere sahip olsun
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()
|