louisepxllock commited on
Commit
76da215
·
verified ·
1 Parent(s): a17fdf4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -1,6 +1,19 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  client = InferenceClient("microsoft/phi-4")
5
  def respond(message, history):
6
  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."}]
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
 
4
+ !pip install -q sentence-transformers
5
+ from sentence_transformers import SentenceTransformer
6
+ import torch
7
+
8
+ # Open the .txt file in read mode with UTF-8 encoding which you uploade
9
+ with open("uni_dataset.txt", "r", encoding="latin-1") as file:
10
+ # Read the entire contents of the file and store it in a variabled
11
+ readme_text = file.read()
12
+
13
+ # Print the text below
14
+ print("success")
15
+
16
+
17
  client = InferenceClient("microsoft/phi-4")
18
  def respond(message, history):
19
  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."}]