Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
from gpt_index import GPTSimpleVectorIndex
|
| 2 |
from langchain import OpenAI
|
| 3 |
import gradio as gr
|
|
|
|
| 4 |
import sys
|
| 5 |
import os
|
| 6 |
import datetime
|
|
@@ -66,12 +67,12 @@ def chatbot(input_text, mentioned_person='Mediator John Haynes'):
|
|
| 66 |
return response.response
|
| 67 |
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
|
| 76 |
iface.launch()
|
| 77 |
|
|
|
|
| 1 |
from gpt_index import GPTSimpleVectorIndex
|
| 2 |
from langchain import OpenAI
|
| 3 |
import gradio as gr
|
| 4 |
+
from gradio import Interface, Textbox
|
| 5 |
import sys
|
| 6 |
import os
|
| 7 |
import datetime
|
|
|
|
| 67 |
return response.response
|
| 68 |
|
| 69 |
|
| 70 |
+
iface = Interface(
|
| 71 |
+
fn=chatbot,
|
| 72 |
+
inputs=Textbox("Enter your question"),
|
| 73 |
+
outputs="text",
|
| 74 |
+
title="AI Chatbot trained on J. Haynes mediation material, v0.5",
|
| 75 |
+
description="Please enter a question for the chatbot eg How do you use intuition in a mediation?")
|
| 76 |
|
| 77 |
iface.launch()
|
| 78 |
|