Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -71,19 +71,14 @@ def generate_response(message, history, temperature, max_new_tokens):
|
|
| 71 |
partial_message += new_text
|
| 72 |
yield partial_message.strip()
|
| 73 |
|
| 74 |
-
except RuntimeError as e:
|
| 75 |
-
if "CUDA out of memory" in str(e):
|
| 76 |
-
yield "GPU memory exceeded. Try reducing the max tokens or using a smaller model."
|
| 77 |
-
else:
|
| 78 |
-
yield f"An error occurred: {str(e)}"
|
| 79 |
except Exception as e:
|
| 80 |
-
yield f"An
|
| 81 |
|
| 82 |
css = """
|
| 83 |
#output {
|
| 84 |
-
height:
|
| 85 |
overflow: auto;
|
| 86 |
-
border:
|
| 87 |
}
|
| 88 |
"""
|
| 89 |
|
|
|
|
| 71 |
partial_message += new_text
|
| 72 |
yield partial_message.strip()
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
except Exception as e:
|
| 75 |
+
yield f"An error occurred: {str(e)}"
|
| 76 |
|
| 77 |
css = """
|
| 78 |
#output {
|
| 79 |
+
height: 1000px;
|
| 80 |
overflow: auto;
|
| 81 |
+
border: 2px solid #ccc;
|
| 82 |
}
|
| 83 |
"""
|
| 84 |
|