nickmuchi commited on
Commit
fc9fa80
1 Parent(s): fcd0f51

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +5 -5
functions.py CHANGED
@@ -75,12 +75,12 @@ If you don't know the answer, just say that you don't know, don't try to make up
75
  ALWAYS return a "SOURCES" part in your answer.
76
  The "SOURCES" part should be a reference to the source of the document from which you got your answer.
77
 
78
- Example of your response should be:
79
 
80
- ```
81
- The answer is foo
82
  SOURCES: xyz
83
- ```
84
 
85
  If there is no sources found please return the below:
86
 
@@ -302,7 +302,7 @@ def inference(link, upload, _asr_model):
302
 
303
  st.write('Whisper API Error, using Whisper module from GitHub, might take longer than expected')
304
 
305
- results = _asr_model.transcribe(path, task='transcribe', language='en')
306
 
307
  return results['text'], yt.title
308
 
 
75
  ALWAYS return a "SOURCES" part in your answer.
76
  The "SOURCES" part should be a reference to the source of the document from which you got your answer.
77
 
78
+ In addition to giving an answer, also return a score of how fully it answered the user's question. This should be in the following format:
79
 
80
+ Question: [question here]
81
+ Helpful Answer: [answer here]
82
  SOURCES: xyz
83
+ Score: [score between 0 and 100]
84
 
85
  If there is no sources found please return the below:
86
 
 
302
 
303
  st.write('Whisper API Error, using Whisper module from GitHub, might take longer than expected')
304
 
305
+ results = _asr_model.transcribe(audio_file, task='transcribe', language='en')
306
 
307
  return results['text'], yt.title
308