phate334 commited on
Commit
e20ecc6
1 Parent(s): d2be203

[fix] fetch device name bug.

Browse files
Files changed (1) hide show
  1. main.py +1 -2
main.py CHANGED
@@ -26,8 +26,7 @@ device_options = [
26
 
27
  def process_url(url, context_length, device_selection):
28
  try:
29
- # 取得選擇的裝置鍵值
30
- device_name = device_selection.split(" ")[0]
31
  selected_device = devices[device_name]
32
  res = os.popen(
33
  f'./{gguf_parser} --ctx-size={context_length} -url {url} --device-metric "{selected_device.FLOPS};{selected_device.memory_bandwidth}GBps" --json'
 
26
 
27
  def process_url(url, context_length, device_selection):
28
  try:
29
+ device_name = device_selection.split(" (")[0]
 
30
  selected_device = devices[device_name]
31
  res = os.popen(
32
  f'./{gguf_parser} --ctx-size={context_length} -url {url} --device-metric "{selected_device.FLOPS};{selected_device.memory_bandwidth}GBps" --json'