Jesus Carrasco commited on
Commit
dfc10d1
·
1 Parent(s): 4011179

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import openai
2
+ import gradio as gr
3
+
4
+ # Your chatbot function here
5
+ def chatbot(input_text):
6
+ # Code to interact with GPT-3.5 Turbo and get a response
7
+ # ...
8
+ return response
9
+
10
+ # Create a Gradio UI for the chatbot function
11
+ iface = gr.Interface(
12
+ fn=chatbot,
13
+ inputs=gr.inputs.Textbox(lines=5, label="Your input"),
14
+ outputs=gr.outputs.Textbox(label="Chatbot response"),
15
+ title="Chatbot using GPT-3.5 Turbo",
16
+ )
17
+
18
+ # Start the Gradio server
19
+ iface.launch()