Spaces:
Runtime error
Runtime error
Commit
·
5b584ed
1
Parent(s):
0161bf7
Update app.py
Browse files
app.py
CHANGED
@@ -199,22 +199,6 @@ with gr.Blocks(css = """#col_container {width: 1400px; margin-left: auto; margin
|
|
199 |
deleteFile.click(delete_file, inputs=fileName, outputs=completedMessage)
|
200 |
appendFile.click(append_file, inputs=[fileName, fileContent], outputs=completedMessage )
|
201 |
|
202 |
-
def get_today_filename():
|
203 |
-
from datetime import datetime
|
204 |
-
date = datetime.now().strftime("%Y_%m_%d-%I.%M.%S.%p")
|
205 |
-
#print(f"filename_{date}") 'filename_2023_01_12-03-29-22_AM'
|
206 |
-
return f"MedNER_{date}.csv"
|
207 |
-
|
208 |
-
def get_base(filename):
|
209 |
-
basedir = os.path.dirname(__file__)
|
210 |
-
loadPath = basedir + "\\" + filename
|
211 |
-
#print("Loading: " + loadPath)
|
212 |
-
return loadPath
|
213 |
-
|
214 |
-
def group_by_entity(raw):
|
215 |
-
outputFile = get_base(get_today_filename())
|
216 |
-
out = defaultdict(int)
|
217 |
-
|
218 |
inputs.submit(predict, [inputs, top_p, temperature,chat_counter, chatbot, state], [chatbot, state, chat_counter])
|
219 |
b1.click(predict, [inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter])
|
220 |
b1.click(reset_textbox, [], [inputs])
|
|
|
199 |
deleteFile.click(delete_file, inputs=fileName, outputs=completedMessage)
|
200 |
appendFile.click(append_file, inputs=[fileName, fileContent], outputs=completedMessage )
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
inputs.submit(predict, [inputs, top_p, temperature,chat_counter, chatbot, state], [chatbot, state, chat_counter])
|
203 |
b1.click(predict, [inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter])
|
204 |
b1.click(reset_textbox, [], [inputs])
|