ogegadavis254 commited on
Commit
4abcfbc
1 Parent(s): d7da48f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -1
app.py CHANGED
@@ -1,3 +1,18 @@
1
  import gradio as gr
2
 
3
- gr.load("models/mistralai/Mistral-7B-Instruct-v0.1").launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ def respond_to_input(input_text):
4
+ # Define responses to different inputs
5
+ if input_text.lower() == "hello":
6
+ return "Hi there! How can I assist you today?"
7
+ elif "how are you" in input_text.lower():
8
+ return "I'm just a computer program, but thanks for asking!"
9
+ else:
10
+ return "I'm not sure how to respond to that. Can you please be more specific?"
11
+
12
+ gr.Interface(
13
+ fn=respond_to_input,
14
+ inputs="text",
15
+ outputs="text",
16
+ title="Conversational AI",
17
+ description="Type a message to chat with the AI."
18
+ ).launch()