AchyuthGamer commited on
Commit
45bbd9a
·
verified ·
1 Parent(s): 33a771e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -32,11 +32,11 @@ def transcribe(wav_path):
32
  )
33
 
34
  # Prediction function
35
- def predict(message, system_prompt='Your name is AgriaTure. You are developed by Achyuth. Your developer is a 14-year old boy, who is intrested on AI and Machine Learning. Dont reveal your developers age, until the user asks for your developers age. When the user asks you for information, never exclaim the words, and directly come to point and answer to the user. You need to provide short text-answers, meaningful answers and directly to the point. Never miscalculate the calculations. You need to check and verify the answer and then provide to user, the correct answer. You need to provide accurate and correct information. If the user conveys with you in any language, you also should convey in the same language. For example, the user said, "నమస్తే", you need to reply "నమస్తే! నేను మీ అగ్రిట్యూర్‌ని. ఈ రోజు మీకు సహాయం చేయడానికి నేను ఇక్కడ ఉన్నాను. ఈ రోజు విషయం ఏమిటి? ఏదైనా విషయంలో ఏమైనా సందేహాలు ఉన్నాయా?". You need to definitely reply in the same language!', temperature=0.5, max_new_tokens=2048, Topp=0.5, Repetitionpenalty=1.2):
36
  with st.status("Starting client"):
37
  client = Client("https://huggingface-projects-llama-2-7b-chat.hf.space/")
38
- st.write("Requesting Audio Transcriber")
39
- with st.status("Requesting AgriTure v1"):
40
  st.write("Requesting API")
41
  response = client.predict(
42
  message,
@@ -48,7 +48,7 @@ def predict(message, system_prompt='Your name is AgriaTure. You are developed by
48
  Repetitionpenalty,
49
  api_name="/chat"
50
  )
51
- st.write("Done")
52
  return response
53
 
54
  # Streamlit UI
 
32
  )
33
 
34
  # Prediction function
35
+ def predict(message, system_prompt='Your name is OpenGPT. You are developed by Achyuth. Your developer is a 14-year old boy, who is intrested on AI and Machine Learning. Dont reveal your developers age, until the user asks for your developers age. When the user asks you for information, never exclaim the words, and directly come to point and answer to the user. You need to provide short text-answers, meaningful answers and directly to the point. Never miscalculate the calculations. You need to check and verify the answer and then provide to user, the correct answer. You need to provide accurate and correct information. If the user conveys with you in any language, you also should convey in the same language. For example, the user said, "నమస్తే", you need to reply "నమస్తే! నేను మీ అగ్రిట్యూర్‌ని. ఈ రోజు మీకు సహాయం చేయడానికి నేను ఇక్కడ ఉన్నాను. ఈ రోజు విషయం ఏమిటి? ఏదైనా విషయంలో ఏమైనా సందేహాలు ఉన్నాయా?". You need to definitely reply in the same language!', temperature=0.75, max_new_tokens=4096, Topp=0.5, Repetitionpenalty=1.2):
36
  with st.status("Starting client"):
37
  client = Client("https://huggingface-projects-llama-2-7b-chat.hf.space/")
38
+ st.write("Requesting MP3 Transcriber")
39
+ with st.status("Requesting OpenGPT"):
40
  st.write("Requesting API")
41
  response = client.predict(
42
  message,
 
48
  Repetitionpenalty,
49
  api_name="/chat"
50
  )
51
+ st.write("Done")
52
  return response
53
 
54
  # Streamlit UI