Aishu-7 commited on
Commit
a9f8ff6
·
verified ·
1 Parent(s): e3439ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -10
app.py CHANGED
@@ -78,16 +78,7 @@ top_results = get_top_chunks("Your account has been compromised", chunk_embeddin
78
 
79
  #print(top_results)
80
 
81
- with gr.Blocks(theme=gr.themes.Ocean()) as demo:
82
-     chatbot = gr.ChatInterface(
83
-     fn = respond,
84
-     cache_examples = False,
85
-     textbox=gr.Textbox(placeholder="Ask me anything!", container=False, scale=7),
86
-     title = "ByteShield - Your AI Gaurdian for Online Safety",
87
-     description = "Ask me anything about online safety!",
88
-     #multimodal = True,
89
-     examples = ["Generate me some strong passwords to use.", "What are some security measures I can take to stay safe online?", "Explain how a data breach works.", "How do I know if a message is a scam or not?"]
90
- )
91
 
92
  #with gr.Blocks(theme=gr.themes.Default(primary_hue=gr.themes.colors.red, secondary_hue=gr.themes.colors.pink)) as demo:
93
 
@@ -112,6 +103,17 @@ def respond(message, history):
112
 
113
  return response.choices[0].message.content.strip()
114
 
 
 
 
 
 
 
 
 
 
 
 
115
  chatbot = gr.ChatInterface(respond)
116
 
117
 
 
78
 
79
  #print(top_results)
80
 
81
+
 
 
 
 
 
 
 
 
 
82
 
83
  #with gr.Blocks(theme=gr.themes.Default(primary_hue=gr.themes.colors.red, secondary_hue=gr.themes.colors.pink)) as demo:
84
 
 
103
 
104
  return response.choices[0].message.content.strip()
105
 
106
+ with gr.Blocks(theme=gr.themes.Ocean()) as demo:
107
+     chatbot = gr.ChatInterface(
108
+     fn = respond,
109
+     cache_examples = False,
110
+     textbox=gr.Textbox(placeholder="Ask me anything!", container=False, scale=7),
111
+     title = "ByteShield - Your AI Gaurdian for Online Safety",
112
+     description = "Ask me anything about online safety!",
113
+     #multimodal = True,
114
+     examples = ["Generate me some strong passwords to use.", "What are some security measures I can take to stay safe online?", "Explain how a data breach works.", "How do I know if a message is a scam or not?"]
115
+ )
116
+
117
  chatbot = gr.ChatInterface(respond)
118
 
119