nisten commited on
Commit
023bf24
·
verified ·
1 Parent(s): 24b2580

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
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 unexpected error occurred: {str(e)}"
81
 
82
  css = """
83
  #output {
84
- height: 1100px;
85
  overflow: auto;
86
- border: 3px solid #ccc;
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