Update app.py
Browse files
app.py
CHANGED
@@ -3,12 +3,12 @@ import g4f
|
|
3 |
|
4 |
def chatbot_interaction(input_text):
|
5 |
print(input_text)
|
6 |
-
|
7 |
|
8 |
|
9 |
|
10 |
#print(response)
|
11 |
-
return
|
12 |
iface = gr.Interface(
|
13 |
fn=chatbot_interaction,
|
14 |
inputs="text",
|
|
|
3 |
|
4 |
def chatbot_interaction(input_text):
|
5 |
print(input_text)
|
6 |
+
response = g4f.ChatCompletion.create(model='gpt-3.5-turbo', provider=g4f.Provider.DfeHub, messages=[{"role": "user", "content":input_text }], stream=False )
|
7 |
|
8 |
|
9 |
|
10 |
#print(response)
|
11 |
+
return response
|
12 |
iface = gr.Interface(
|
13 |
fn=chatbot_interaction,
|
14 |
inputs="text",
|