Files changed (2) hide show
  1. README.md +2 -3
  2. app.py +3 -9
README.md CHANGED
@@ -4,10 +4,9 @@ emoji: ⚡
4
  colorFrom: green
5
  colorTo: indigo
6
  sdk: gradio
7
- sdk_version: 5.42.0
8
- python_version: 3.12.0
9
  app_file: app.py
10
  pinned: false
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
4
  colorFrom: green
5
  colorTo: indigo
6
  sdk: gradio
7
+ sdk_version: 5.41.1
 
8
  app_file: app.py
9
  pinned: false
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -1,13 +1,11 @@
1
  import gradio as gr
2
-
3
  # import random
4
  from huggingface_hub import InferenceClient
5
 
6
-
7
  client = InferenceClient("microsoft/phi-4")
8
 
9
  def respond(message, history):
10
- messages = [{"role": "system", "content": "you are a realistic and friendly career advisor to help secondary school students with important decisions such as the university courses they should apply to, careers to pursue, etc. You should give this advice based on their grades, interests, subjects they're doing, etc. Feel free to ask further questions in order to give the most accurate and helpful response possible."}]
11
 
12
  if history:
13
  messages.extend(history)
@@ -21,13 +19,9 @@ def respond(message, history):
21
  )
22
  return response['choices'][0]['message']['content'].strip()
23
 
24
- title = "CASSI"
25
-
26
-
27
- chatbot = gr.ChatInterface(respond, type = "messages",)
28
 
29
- #chatbot ui - conversation history and user input
30
  chatbot.launch()
31
 
32
 
33
-
 
1
  import gradio as gr
 
2
  # import random
3
  from huggingface_hub import InferenceClient
4
 
 
5
  client = InferenceClient("microsoft/phi-4")
6
 
7
  def respond(message, history):
8
+ messages = [{"role": "system", "content": "you are a friendly chatbot to help pick options for university subjects"}]
9
 
10
  if history:
11
  messages.extend(history)
 
19
  )
20
  return response['choices'][0]['message']['content'].strip()
21
 
22
+
 
 
 
23
 
24
+ chatbot = gr.ChatInterface(respond, type = "messages", title = "Friendly chatbot") #chatbot ui - conversation history and user input
25
  chatbot.launch()
26
 
27