KG0101 commited on
Commit
5ad7cdb
·
verified ·
1 Parent(s): 5320fa6

Add transcription transfer to editing text box

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -41,7 +41,7 @@ def transcribe(inputs, task):
41
  def generate_soap(
42
  transcribed_text: str,
43
  system_prompt: str = "You are a world class clinical assistant.",
44
- max_new_tokens: int = 1024,
45
  temperature: float = 0.6,
46
  top_p: float = 0.9,
47
  top_k: int = 50,
@@ -130,4 +130,10 @@ with demo:
130
  outputs=soap_output
131
  )
132
 
133
- demo.queue().launch(ssr_mode=False)
 
 
 
 
 
 
 
41
  def generate_soap(
42
  transcribed_text: str,
43
  system_prompt: str = "You are a world class clinical assistant.",
44
+ max_new_tokens: int = 4098,
45
  temperature: float = 0.6,
46
  top_p: float = 0.9,
47
  top_k: int = 50,
 
130
  outputs=soap_output
131
  )
132
 
133
+ # Automatically copy transcription output to the edit box
134
+ def update_transcription_box(transcription_text):
135
+ return transcription_text
136
+
137
+ transcription_output.change(fn=update_transcription_box, inputs=transcription_output, outputs=transcribed_text_input)
138
+
139
+ demo.queue().launch(ssr_mode=False)