Update app.py
Browse files
app.py
CHANGED
|
@@ -50,12 +50,12 @@ def classify_task(prompt):
|
|
| 50 |
for response in stream:
|
| 51 |
if not response.token.text == "</s>":
|
| 52 |
output += response.token.text
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
|
| 60 |
|
| 61 |
|
|
|
|
| 50 |
for response in stream:
|
| 51 |
if not response.token.text == "</s>":
|
| 52 |
output += response.token.text
|
| 53 |
+
if 'text' in output.lower():
|
| 54 |
+
user = text(prompt)
|
| 55 |
+
elif 'image' in output.lower():
|
| 56 |
+
return 'Image Generation'
|
| 57 |
+
else:
|
| 58 |
+
return 'Unknown Task'
|
| 59 |
|
| 60 |
|
| 61 |
|