Spaces:
Sleeping
Sleeping
Update app.py (#2)
Browse files- Update app.py (ddf0b1940b46bebe4f9bbf9c1e00156074cc96fa)
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import io
|
|
| 4 |
|
| 5 |
def create_file(text):
|
| 6 |
cal_text = backend.generate_text(text)
|
| 7 |
-
if cal_text
|
| 8 |
raise gr.Error("No calendar data could be generated from the input.")
|
| 9 |
else:
|
| 10 |
file_obj = io.BytesIO(cal_text.encode("utf-8"))
|
|
|
|
| 4 |
|
| 5 |
def create_file(text):
|
| 6 |
cal_text = backend.generate_text(text)
|
| 7 |
+
if cal_text == "":
|
| 8 |
raise gr.Error("No calendar data could be generated from the input.")
|
| 9 |
else:
|
| 10 |
file_obj = io.BytesIO(cal_text.encode("utf-8"))
|