acecalisto3 commited on
Commit
092ec52
·
verified ·
1 Parent(s): 549d780

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -508,8 +508,8 @@ class IssueManager:
508
  logger.info(f"Filtered out pull requests, {{len(self.issues)}} actual open issues remaining.")
509
 
510
  empty_fig = go.Figure()
511
- empty_fig.update_layout(title="Issue Severity Distribution", xaxis={{"visible": False}, yaxis={{"visible": False},
512
- annotations=[{{"text": "No issues found.", "xref": "paper", "yref": "paper", "showarrow": False}],
513
  plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
514
 
515
  if not self.issues:
@@ -579,7 +579,7 @@ class IssueManager:
579
  self.stop_broadcast_loop()
580
  empty_fig = go.Figure()
581
  empty_fig.update_layout(title="Issue Severity Distribution",
582
- annotations=[{{"text": "API Error.", "xref": "paper", "yref": "paper", "showarrow": False}],
583
  plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
584
  return [], empty_fig, error_msg, empty_fig
585
  except Exception as e:
@@ -588,7 +588,7 @@ class IssueManager:
588
  logger.exception(f"An unexpected error occurred during issue crawl: {{e}}")
589
  empty_fig = go.Figure()
590
  empty_fig.update_layout(title="Issue Severity Distribution",
591
- annotations=[{{"text": "Unexpected Error.", "xref": "paper", "yref": "paper", "showarrow": False}],
592
  plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
593
  return [], empty_fig, f"An unexpected error occurred: {{e}}", empty_fig
594
 
@@ -605,7 +605,7 @@ class IssueManager:
605
  filtered_counts = {{k: v for k, v in severity_counts.items() if v > 0}
606
  if not filtered_counts:
607
  fig = go.Figure()
608
- fig.update_layout(title="Issue Severity Distribution", xaxis={{"visible": False}, yaxis={{"visible": False},
609
  annotations=[{{"text": "No issues to display.", "xref": "paper", "yref": "paper", "showarrow": False, "font": {{"size": 16}}],
610
  plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
611
  return fig
@@ -842,7 +842,7 @@ class IssueManager:
842
  headers = {{"Authorization": f"Bearer {{self.hf_token}}"}
843
  payload = {{
844
  "inputs": prompt,
845
- "parameters": {{"max_new_tokens": 2048, "temperature": 0.1, "return_full_text": False, "do_sample": False},
846
  "options": {{"wait_for_model": True}
847
  }
848
  timeout = aiohttp.ClientTimeout(total=180)
@@ -1387,7 +1387,7 @@ Summary:"""
1387
  headers = {{"Authorization": f"Bearer {{self.hf_token}}"}
1388
  payload = {{
1389
  "inputs": prompt,
1390
- "parameters": {{"max_new_tokens": 128, "temperature": 0.2, "return_full_text": False, "do_sample": False},
1391
  "options": {{"wait_for_model": True}
1392
  }
1393
  timeout = aiohttp.ClientTimeout(total=60)
@@ -1435,7 +1435,7 @@ Missing Information:"""
1435
  headers = {{"Authorization": f"Bearer {{self.hf_token}}"}
1436
  payload = {{
1437
  "inputs": prompt,
1438
- "parameters": {{"max_new_tokens": 64, "temperature": 0.1, "return_full_text": False, "do_sample": False},
1439
  "options": {{"wait_for_model": True}
1440
  }
1441
  timeout = aiohttp.ClientTimeout(total=45)
@@ -1485,7 +1485,7 @@ Response:"""
1485
  headers = {{"Authorization": f"Bearer {{self.hf_token}}"}
1486
  payload = {{
1487
  "inputs": prompt,
1488
- "parameters": {{"max_new_tokens": 80, "temperature": 0.3, "return_full_text": False, "do_sample": False},
1489
  "options": {{"wait_for_model": True}
1490
  }
1491
  timeout = aiohttp.ClientTimeout(total=45)
 
508
  logger.info(f"Filtered out pull requests, {{len(self.issues)}} actual open issues remaining.")
509
 
510
  empty_fig = go.Figure()
511
+ empty_fig.update_layout(title="Issue Severity Distribution", xaxis={{"visible": False}}, yaxis={{"visible": False}},
512
+ annotations=[{{"text": "No issues found.", "xref": "paper", "yref": "paper", "showarrow": False}}],
513
  plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
514
 
515
  if not self.issues:
 
579
  self.stop_broadcast_loop()
580
  empty_fig = go.Figure()
581
  empty_fig.update_layout(title="Issue Severity Distribution",
582
+ annotations=[{{"text": "API Error.", "xref": "paper", "yref": "paper", "showarrow": False}}],
583
  plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
584
  return [], empty_fig, error_msg, empty_fig
585
  except Exception as e:
 
588
  logger.exception(f"An unexpected error occurred during issue crawl: {{e}}")
589
  empty_fig = go.Figure()
590
  empty_fig.update_layout(title="Issue Severity Distribution",
591
+ annotations=[{{"text": "Unexpected Error.", "xref": "paper", "yref": "paper", "showarrow": False}}],
592
  plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
593
  return [], empty_fig, f"An unexpected error occurred: {{e}}", empty_fig
594
 
 
605
  filtered_counts = {{k: v for k, v in severity_counts.items() if v > 0}
606
  if not filtered_counts:
607
  fig = go.Figure()
608
+ fig.update_layout(title="Issue Severity Distribution", xaxis={{"visible": False}}, yaxis={{"visible": False}},
609
  annotations=[{{"text": "No issues to display.", "xref": "paper", "yref": "paper", "showarrow": False, "font": {{"size": 16}}],
610
  plot_bgcolor='rgba(0,0,0,0)', paper_bgcolor='rgba(0,0,0,0)')
611
  return fig
 
842
  headers = {{"Authorization": f"Bearer {{self.hf_token}}"}
843
  payload = {{
844
  "inputs": prompt,
845
+ "parameters": {{"max_new_tokens": 2048, "temperature": 0.1, "return_full_text": False, "do_sample": False}},
846
  "options": {{"wait_for_model": True}
847
  }
848
  timeout = aiohttp.ClientTimeout(total=180)
 
1387
  headers = {{"Authorization": f"Bearer {{self.hf_token}}"}
1388
  payload = {{
1389
  "inputs": prompt,
1390
+ "parameters": {{"max_new_tokens": 128, "temperature": 0.2, "return_full_text": False, "do_sample": False}},
1391
  "options": {{"wait_for_model": True}
1392
  }
1393
  timeout = aiohttp.ClientTimeout(total=60)
 
1435
  headers = {{"Authorization": f"Bearer {{self.hf_token}}"}
1436
  payload = {{
1437
  "inputs": prompt,
1438
+ "parameters": {{"max_new_tokens": 64, "temperature": 0.1, "return_full_text": False, "do_sample": False}},
1439
  "options": {{"wait_for_model": True}
1440
  }
1441
  timeout = aiohttp.ClientTimeout(total=45)
 
1485
  headers = {{"Authorization": f"Bearer {{self.hf_token}}"}
1486
  payload = {{
1487
  "inputs": prompt,
1488
+ "parameters": {{"max_new_tokens": 80, "temperature": 0.3, "return_full_text": False, "do_sample": False}},
1489
  "options": {{"wait_for_model": True}
1490
  }
1491
  timeout = aiohttp.ClientTimeout(total=45)