chenguittiMaroua commited on
Commit
95ee435
·
verified ·
1 Parent(s): e1a5e13

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +7 -2
main.py CHANGED
@@ -114,10 +114,10 @@ os.makedirs(OUTPUT_FOLDER, exist_ok=True)
114
 
115
  # Lightweight model configuration
116
  MODEL_NAME = "distilgpt2"
 
117
  TIMEOUT = 10 # seconds
118
  MAX_ROWS = 100
119
  MAX_COLUMNS = 5
120
- MAX_FILE_SIZE = 10 * 1024 * 1024 # 10MB
121
  try:
122
  visualization_model = pipeline(
123
  "text-generation",
@@ -739,4 +739,9 @@ if __name__ == "__main__":
739
  print(f"Error: {response.status_code}\n{response.text}")
740
 
741
  # 6. Optional: Run the server (if not already running)
742
- uvicorn.run(app, host="0.0.0.0", port=7860)
 
 
 
 
 
 
114
 
115
  # Lightweight model configuration
116
  MODEL_NAME = "distilgpt2"
117
+ MAX_FILE_SIZE = 2 * 1024 * 1024 # 2MB
118
  TIMEOUT = 10 # seconds
119
  MAX_ROWS = 100
120
  MAX_COLUMNS = 5
 
121
  try:
122
  visualization_model = pipeline(
123
  "text-generation",
 
739
  print(f"Error: {response.status_code}\n{response.text}")
740
 
741
  # 6. Optional: Run the server (if not already running)
742
+ uvicorn.run(
743
+ app,
744
+ host="0.0.0.0",
745
+ port=8000,
746
+ timeout_keep_alive=15
747
+ )