Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -158,7 +158,7 @@ def summarize(inp,history,data=None,file=None):
|
|
| 158 |
|
| 159 |
history = [(inp,"Working on it...")] if not history else history
|
| 160 |
yield "",history
|
| 161 |
-
if file
|
| 162 |
try:
|
| 163 |
with open(file,"r") as f:
|
| 164 |
zz=f.readlines()
|
|
@@ -228,6 +228,6 @@ with gr.Blocks() as app:
|
|
| 228 |
file=gr.File(label="Input File")
|
| 229 |
#text=gr.JSON()
|
| 230 |
#inp_query.change(search_models,inp_query,models_dd)
|
| 231 |
-
go=button.click(summarize,[prompt,chatbot,data],[prompt,chatbot])
|
| 232 |
stop_button.click(None,None,None,cancels=[go])
|
| 233 |
app.launch(server_port=7860,show_api=False)
|
|
|
|
| 158 |
|
| 159 |
history = [(inp,"Working on it...")] if not history else history
|
| 160 |
yield "",history
|
| 161 |
+
if file:
|
| 162 |
try:
|
| 163 |
with open(file,"r") as f:
|
| 164 |
zz=f.readlines()
|
|
|
|
| 228 |
file=gr.File(label="Input File")
|
| 229 |
#text=gr.JSON()
|
| 230 |
#inp_query.change(search_models,inp_query,models_dd)
|
| 231 |
+
go=button.click(summarize,[prompt,chatbot,data,file],[prompt,chatbot])
|
| 232 |
stop_button.click(None,None,None,cancels=[go])
|
| 233 |
app.launch(server_port=7860,show_api=False)
|