parquet-converter commited on
Commit
16dd93d
·
1 Parent(s): c90abc8

Update parquet files (step 42 of 296)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. spaces/1acneusushi/gradio-2dmoleculeeditor/data/HD Online Player (download Gangs Of Wasseypur movie ut) Anurag Kashyaps Magnum Opus.md +0 -93
  2. spaces/1gistliPinn/ChatGPT4/Dish-Network-Acquiring-Signal-535-Stuck.md +0 -86
  3. spaces/1phancelerku/anime-remove-background/Download Mortal Kombat vs Street Fighter The Ultimate MUGEN Game.md +0 -133
  4. spaces/2023Liu2023/bingo/src/components/button-scroll-to-bottom.tsx +0 -34
  5. spaces/232labs/VToonify/vtoonify/model/bisenet/model.py +0 -283
  6. spaces/AIConsultant/MusicGen/audiocraft/utils/cache.py +0 -323
  7. spaces/AIGC-Audio/AudioGPT/text_to_audio/Make_An_Audio/ldm/util.py +0 -136
  8. spaces/AIxPha/QSign/Dockerfile +0 -15
  9. spaces/Abdllh/Arabic_Poems_Generator/app.py +0 -49
  10. spaces/AchyuthGamer/OpenGPT/g4f/Provider/Providers/ChatForAi.py +0 -53
  11. spaces/AchyuthGamer/OpenGPT/g4f/Provider/Providers/DeepAi.py +0 -77
  12. spaces/Amrrs/DragGan-Inversion/PTI/models/StyleCLIP/mapper/__init__.py +0 -0
  13. spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/docs/source/en/api/configuration.md +0 -30
  14. spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/tests/pipelines/deepfloyd_if/test_if_img2img.py +0 -90
  15. spaces/Andy1621/uniformer_image_detection/configs/hrnet/faster_rcnn_hrnetv2p_w40_1x_coco.py +0 -10
  16. spaces/Andy1621/uniformer_image_detection/mmdet/apis/__init__.py +0 -10
  17. spaces/AnishKumbhar/ChatBot/text-generation-webui-main/docs/DeepSpeed.md +0 -24
  18. spaces/Anonymous-sub/Rerender/ControlNet/annotator/uniformer/mmcv/runner/builder.py +0 -24
  19. spaces/Anthony7906/MengHuiMXD_GPT/custom.css +0 -162
  20. spaces/Arulkumar03/GroundingDINO_SOTA_Zero_Shot_Model/groundingdino/datasets/transforms.py +0 -311
  21. spaces/Ashrafb/translate/README.md +0 -14
  22. spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_internal/wheel_builder.py +0 -355
  23. spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/__init__.py +0 -23
  24. spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pkg_resources/_vendor/importlib_resources/readers.py +0 -122
  25. spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_200ep_LSJ.py +0 -14
  26. spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/configs/quick_schedules/README.md +0 -8
  27. spaces/BAAI/SegGPT/app.py +0 -211
  28. spaces/Benson/text-generation/Examples/Asfalto 9 Leyendas Descargar Sin Tienda Microsoft.md +0 -47
  29. spaces/Benson/text-generation/Examples/Descarga De La Aplicacin Xender 2019.md +0 -181
  30. spaces/BetterAPI/BetterChat/src/lib/utils/analytics.ts +0 -39
  31. spaces/BetterAPI/BetterChat_new/src/lib/utils/randomUuid.ts +0 -14
  32. spaces/BilalSardar/Lyrics-Text_to_music/app.py +0 -203
  33. spaces/CVPR/Text2Human/Text2Human/models/losses/__init__.py +0 -0
  34. spaces/CVPR/lama-example/models/ade20k/segm_lib/nn/modules/__init__.py +0 -12
  35. spaces/CVPR/lama-example/models/ade20k/segm_lib/nn/modules/replicate.py +0 -94
  36. spaces/ChrisCaviar/ControlNet-v1-1/app_scribble.py +0 -105
  37. spaces/CoPoBio/skin_cancer_risk_prediction/README.md +0 -13
  38. spaces/CohereForAI/pokemon-cards-explorer/src/upsert.py +0 -70
  39. spaces/CorvaeOboro/gen_ability_icon/torch_utils/ops/upfirdn2d.h +0 -59
  40. spaces/DAOGEN/README/README.md +0 -52
  41. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/PIL/GribStubImagePlugin.py +0 -73
  42. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/PIL/PcdImagePlugin.py +0 -62
  43. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fontTools/ttLib/tables/T_S_I__3.py +0 -20
  44. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/templates/cdn/assets/index-3cb0bda2.js +0 -2
  45. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/templates/frontend/assets/Button-89624748.js +0 -4
  46. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/h11/tests/test_receivebuffer.py +0 -135
  47. spaces/DaleChen/AutoGPT/autogpt/setup.py +0 -77
  48. spaces/Docfile/open_llm_leaderboard/src/display_models/utils.py +0 -146
  49. spaces/Dorado607/ChuanhuChatGPT/README.md +0 -13
  50. spaces/Dorado607/ChuanhuChatGPT/modules/models/Google_PaLM.py +0 -26
spaces/1acneusushi/gradio-2dmoleculeeditor/data/HD Online Player (download Gangs Of Wasseypur movie ut) Anurag Kashyaps Magnum Opus.md DELETED
@@ -1,93 +0,0 @@
1
- <br />
2
- <h1>HD Online Player (download Gangs Of Wasseypur movie ut)</h1>
3
- <p>If you are a fan of Indian crime movies, you must have heard of <strong>Gangs of Wasseypur</strong>, a two-part epic film directed by Anurag Kashyap and starring Manoj Bajpayee, Nawazuddin Siddiqui, Richa Chadda, and Tigmanshu Dhulia. The film is based on the real-life story of the coal mafia in Dhanbad, Jharkhand, and their violent rivalry with a powerful politician.</p>
4
- <p>Gangs of Wasseypur is widely regarded as one of the best films ever made in India, and has received critical acclaim and commercial success both in India and abroad. The film has been screened at various international film festivals, such as Cannes, Sundance, Toronto, and Sydney, and has been listed among the 100 greatest movies of the 21st century by The Guardian.</p>
5
- <h2>HD Online Player (download Gangs Of Wasseypur movie ut)</h2><br /><p><b><b>Download</b> ->>->>->> <a href="https://byltly.com/2uKxOt">https://byltly.com/2uKxOt</a></b></p><br /><br />
6
- <p>If you have not watched this masterpiece yet, or if you want to watch it again, you may be wondering how to download or watch Gangs of Wasseypur movie using HD online player. In this article, we will show you how to do that in simple steps, as well as discuss the benefits and drawbacks of using HD online player for Gangs of Wasseypur movie. We will also suggest some alternatives to HD online player for Gangs of Wasseypur movie in case you want to try something different.</p>
7
- <h2>How to download Gangs of Wasseypur movie using HD online player?</h2>
8
- <p>Downloading Gangs of Wasseypur movie using HD online player is a convenient and easy way to enjoy the film offline on your device. Here are the steps you need to follow:</p>
9
- <ol>
10
- <li>Find a reliable HD online player that supports Gangs of Wasseypur movie. There are many HD online players available on the internet, but not all of them may have Gangs of Wasseypur movie in their library. You need to do some research and find a trustworthy and reputable HD online player that has Gangs of Wasseypur movie in its collection.</li>
11
- <li>Choose the quality and format of the movie you want to download. Once you have found a suitable HD online player that has Gangs of Wasseypur movie, you need to select the quality and format of the movie you want to download. Depending on your preference and device compatibility, you can choose from various options such as MP4, MKV, AVI, WMV, etc., and different resolutions such as 720p, 1080p, etc.</li>
12
- <li>Click on the download button and wait for the movie to be saved on your device. After choosing the quality and format of the movie you want to download, you need to click on the download button and wait for the movie to be saved on your device. Depending on your internet speed and file size, this may take some time.</li>
13
- </ol>
14
- <h2>How to watch Gangs of Wasseypur movie online using HD online player?</h2>
15
- <p>Watching Gangs of Wasseypur movie online using HD online player is another convenient and easy way to enjoy the film on your screen. Here are the steps you need to follow:</p>
16
- <ol>
17
- <li>Find a reliable HD online player that supports Gangs of Wasseypur movie. As mentioned above, not all HD online players may have Gangs of Wasseypur movie in their library. You need to do some research and find a trustworthy and reputable HD online player that has Gangs of Wasseypur movie in its collection.</li>
18
- <li>Choose the quality and format of the movie you want to watch. Once you have found a suitable HD online player that has Gangs of Wasseypur movie, you need to select the quality and format of the movie you want to watch. Depending on your preference and device compatibility, you can choose from various options such as MP4, MKV, AVI, WMV, etc., and different resolutions such as 720p, 1080p, etc.</li>
19
- <li>Click on the play button and enjoy the movie on your screen. After choosing the quality and format of the movie you want to watch, you need to click on the play button and enjoy the movie on your screen. Depending on your internet speed and file size, this may take some time.</li>
20
- </ol>
21
- <h2>What are the benefits of using HD online player for Gangs of Wasseypur movie?</h2>
22
- <p>Using HD online player for Gangs of Wasseypur movie has some benefits that make it an attractive option for many viewers. Here are some of them:</p>
23
- <ul>
24
- <li>You can enjoy high-definition quality and smooth streaming of the film without any compromise.</li>
25
- <li>You can save bandwidth and storage space by downloading or watching the film in compressed formats.</li>
26
- <li>You can access the film anytime and anywhere without any restrictions or interruptions.</li>
27
- </ul>
28
- <h2>What are the drawbacks of using HD online player for Gangs of Wasseypur movie?</h2>
29
- <p>Using HD online player for Gangs of Wasseypur movie also has some drawbacks that make it a risky option for some viewers. Here are some of them:</p>
30
- <ul>
31
- <li>You may encounter some legal issues or risks if you download or watch the film from unauthorized sources. You may violate the copyright laws or face the wrath of the producers or distributors of the film.</li>
32
- <li>You may face some technical problems or errors if you use an unreliable or outdated HD online player. You may experience poor quality, buffering, lagging, crashing, or malware infection.</li>
33
- <li>You may miss some features or extras that are available on other platforms or media. You may not get the subtitles, audio tracks, commentaries, behind-the-scenes, or bonus materials that are included in the DVD or Here are some FAQs at the end of the article: <h2>FAQs</h2>
34
- <ul>
35
- <li><strong>Is Gangs of Wasseypur based on a true story?</strong></li>
36
- <li>Yes, the movie is loosely based on the real-life gang wars, criminal activity, and political corruption that occurred in the region of Dhanbad, Jharkhand, India during the 1990s and 2000s.</li>
37
- <li><strong>Who wrote the story for Gangs of Wasseypur?</strong></li>
38
- <li>The story for Gangs of Wasseypur was written by Anurag Kashyap and Zeishan Quadri, who also acted in the movie as Definite Khan.</li>
39
- <li><strong>What is the plot of Gangs of Wasseypur?</strong></li>
40
- <li>The plot of Gangs of Wasseypur follows the violent rivalry between three crime families: the Khans, the Singhs, and the Qureshis, over the control of the coal-mining town of Wasseypur. The film spans 68 years from 1941 to 2009 and depicts the rise and fall of various characters involved in the blood feud.</li>
41
- <li><strong>Where were Gangs of Wasseypur filmed?</strong></li>
42
- <li>Gangs of Wasseypur were filmed in various locations in India, such as Varanasi, Bihar, Jharkhand, Delhi, Mumbai, and Goa. The film also used some archival footage and photographs to recreate the historical events and settings.</li>
43
- <li><strong>Why does Anurag Kashyap hate Gangs of Wasseypur?</strong></li>
44
- <li>Anurag Kashyap hates Gangs of Wasseypur because he feels that everybody expects him to keep making the same kind of films which he is never going to do again in his life. He wants to make different kinds of films and move forward with his cinema. </li>
45
- </ul>
46
- </p>
47
- <p>Watch Gangs of Wasseypur full HD movie online on JioCinema<br />
48
- Gangs of Wasseypur Google Play Movies rental and download<br />
49
- Gangs of Wasseypur Netflix streaming and download<br />
50
- Gangs of Wasseypur Amazon Prime Video streaming and download<br />
51
- Gangs of Wasseypur Voot streaming and download<br />
52
- Gangs of Wasseypur EPIC ON streaming and download<br />
53
- Gangs of Wasseypur YouTube rental and download<br />
54
- Gangs of Wasseypur Apple TV rental and download<br />
55
- Gangs of Wasseypur Part 1 JustWatch streaming options<br />
56
- Gangs of Wasseypur Part 2 JustWatch streaming options<br />
57
- Gangs of Wasseypur Manoj Bajpai performance review<br />
58
- Gangs of Wasseypur Richa Chadda performance review<br />
59
- Gangs of Wasseypur Nawazuddin Siddiqui performance review<br />
60
- Gangs of Wasseypur Tigmanshu Dhulia performance review<br />
61
- Gangs of Wasseypur Anurag Kashyap direction review<br />
62
- Gangs of Wasseypur Sultana Daku historical background<br />
63
- Gangs of Wasseypur Ramadhir Singh character analysis<br />
64
- Gangs of Wasseypur Sardar Khan character analysis<br />
65
- Gangs of Wasseypur socio-political dynamic in Bihar<br />
66
- Gangs of Wasseypur coal and scrap trade mafia history<br />
67
- Gangs of Wasseypur Bollywood cinema influence and references<br />
68
- Gangs of Wasseypur songs and music review<br />
69
- Gangs of Wasseypur dialogues and scripts analysis<br />
70
- Gangs of Wasseypur violence and blood scenes rating<br />
71
- Gangs of Wasseypur adult and mature content warning<br />
72
- How to watch Gangs of Wasseypur in HD quality online for free<br />
73
- How to download Gangs of Wasseypur in HD quality online for free<br />
74
- How to watch Gangs of Wasseypur with English subtitles online<br />
75
- How to watch Gangs of Wasseypur with Hindi subtitles online<br />
76
- How to watch Gangs of Wasseypur with regional subtitles online<br />
77
- How long is the runtime of Gangs of Wasseypur Part 1 and Part 2<br />
78
- How much is the box office collection of Gangs of Wasseypur Part 1 and Part 2<br />
79
- How many awards did Gangs of Wasseypur win and nominate for<br />
80
- How did the critics and audience react to Gangs of Wasseypur Part 1 and Part 2<br />
81
- How realistic and authentic is the portrayal of Gangs of Wasseypur Part 1 and Part 2<br />
82
- What are the similarities and differences between Gangs of Wasseypur and The Godfather trilogy<br />
83
- What are the best scenes and moments from Gangs of Wasseypur Part 1 and Part 2<br />
84
- What are the best quotes and dialogues from Gangs of Wasseypur Part 1 and Part 2<br />
85
- What are the best songs and music from Gangs of Wasseypur Part 1 and Part 2<br />
86
- What are the best performances and characters from Gangs of Wasseypur Part 1 and Part 2<br />
87
- What are the themes and messages from Gangs of Wasseypur Part 1 and Part 2<br />
88
- What are the trivia and facts about Gangs of Wasseypur Part 1 and Part 2<br />
89
- What are the controversies and issues related to Gangs of Wasseypur Part 1 and Part 2<br />
90
- What are the sequels and spin-offs from Gangs of Wasseypur Part 1 and Part 2<br />
91
- What are the inspirations and influences behind Gangs of Wasseypur Part 1 and Part 2</p> 0a6ba089eb<br />
92
- <br />
93
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1gistliPinn/ChatGPT4/Dish-Network-Acquiring-Signal-535-Stuck.md DELETED
@@ -1,86 +0,0 @@
1
- ## dish network acquiring signal 535 stuck
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
- **LINK >> [https://www.google.com/url?q=https%3A%2F%2Furloso.com%2F2txScn&sa=D&sntz=1&usg=AOvVaw1hNRMRN9lIrcWiSYHSIcZW](https://www.google.com/url?q=https%3A%2F%2Furloso.com%2F2txScn&sa=D&sntz=1&usg=AOvVaw1hNRMRN9lIrcWiSYHSIcZW)**
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
- Here is a possible title and article with html formatting for the keyword "dish network acquiring signal 535 stuck":
24
-
25
- # How to Troubleshoot Dish Network Acquiring Signal 535 Stuck
26
-
27
-
28
-
29
- If you are a Dish Network customer, you may have encountered a problem where your receiver is stuck on acquiring signal 535. This means that the receiver is having difficulty communicating with the satellite and cannot display any channels. This can be frustrating, especially if you want to watch your favorite shows or movies. Fortunately, there are some steps you can take to try to fix this issue and restore your service.
30
-
31
-
32
-
33
- Before you start troubleshooting, make sure that your receiver is plugged in and turned on. Also, check the weather conditions in your area. If there is heavy rain, snow, wind, or clouds, they may interfere with the satellite signal and cause temporary loss of service. If the weather is clear, proceed with the following steps:
34
-
35
-
36
-
37
- 1. Check all of the connections between your receiver and the satellite dish. Make sure that they are secure and not loose, damaged, or corroded. If you see any signs of wear or tear, replace the cables or connectors as needed.
38
-
39
- 2. Reset your receiver by unplugging it from the power outlet for 10 seconds and then plugging it back in. Wait for it to reboot and see if the acquiring signal message goes away.
40
-
41
- 3. Run a check switch test on your receiver. This will scan for available satellites and transponders and update your receiver's settings accordingly. To do this, press the Menu button on your remote control and select Settings > Diagnostics > Check Switch > Test. Wait for the test to complete and then press View Results. You should see a list of satellites and transponders with green check marks next to them. If you see any red Xs or fewer satellites than before, there may be a problem with your dish alignment, LNB, or switch.
42
-
43
- 4. If none of the above steps work, you may need to contact Dish Network customer service and schedule a technician visit. They will be able to diagnose and fix any issues with your equipment or installation.
44
-
45
-
46
-
47
- We hope this article helped you troubleshoot Dish Network acquiring signal 535 stuck. If you have any questions or feedback, please leave a comment below.
48
-
49
- Here is a possible continuation of the article with html formatting:
50
-
51
- Some common causes of Dish Network acquiring signal 535 stuck are:
52
-
53
-
54
-
55
- - A misaligned dish. This can happen due to strong winds, storms, or other factors that may shift the position of the dish. A misaligned dish will not receive the optimal signal from the satellite and may cause signal loss or interruption.
56
-
57
- - A faulty LNB. The LNB (low-noise block downconverter) is the device that receives the signal from the dish and converts it to a lower frequency. If the LNB is damaged or malfunctioning, it may not be able to process the signal correctly and cause errors or glitches.
58
-
59
- - A defective switch. The switch is the device that connects multiple receivers to a single dish. If the switch is faulty, it may not be able to distribute the signal properly and cause some receivers to lose service.
60
-
61
- - A broken cable. The cable is the wire that connects the receiver to the dish, LNB, or switch. If the cable is cut, frayed, or corroded, it may not be able to transmit the signal effectively and cause interference or disruption.
62
-
63
-
64
-
65
- To prevent Dish Network acquiring signal 535 stuck, you should:
66
-
67
-
68
-
69
- - Regularly check your dish for any signs of damage or misalignment. If you notice any issues, contact Dish Network customer service and request a technician visit.
70
-
71
- - Keep your cables and connectors clean and dry. Avoid exposing them to moisture, dust, or extreme temperatures. Replace them if they show any signs of wear or tear.
72
-
73
- - Use a surge protector to protect your equipment from power surges or fluctuations. This can help prevent damage to your receiver, LNB, switch, or cable.
74
-
75
- - Avoid placing any objects or obstacles near your dish that may block or interfere with the signal. This includes trees, buildings, antennas, or other devices that may emit radio waves.
76
-
77
-
78
-
79
- We hope this article helped you troubleshoot Dish Network acquiring signal 535 stuck. If you have any questions or feedback, please leave a comment below.
80
-
81
- dfd1c89656
82
-
83
-
84
-
85
-
86
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1phancelerku/anime-remove-background/Download Mortal Kombat vs Street Fighter The Ultimate MUGEN Game.md DELETED
@@ -1,133 +0,0 @@
1
- <br />
2
- <h1>How to Download Mortal Kombat vs Street Fighter PC</h1>
3
- <p>If you are a fan of fighting games, you might have heard of <strong>Mortal Kombat vs Street Fighter PC</strong>, a fan-made crossover game that combines two of the most iconic franchises in the genre. In this game, you can choose from a roster of over 40 characters from both Mortal Kombat and Street Fighter universes, and engage in epic battles with various modes, stages, and moves.</p>
4
- <h2>download mortal kombat vs street fighter pc</h2><br /><p><b><b>Download File</b> &#10042; <a href="https://jinyurl.com/2uNK7A">https://jinyurl.com/2uNK7A</a></b></p><br /><br />
5
- <p>But how can you download this game on your PC? And how can you do it safely and legally? In this article, we will show you how to download Mortal Kombat vs Street Fighter PC from verified platforms, how to check your PC specs, how to avoid unverified sources, and how to follow the game's instructions and terms of service. By following these steps, you will be able to enjoy this amazing game without any hassle or risk.</p>
6
- <p>Downloading games online has many benefits, such as saving time and money, accessing a wider variety of games, getting updates and patches automatically, and supporting the developers. However, it also comes with some challenges, such as ensuring compatibility, security, and legality. That's why we are here to help you with this guide.</p>
7
- <h2>How to Download Mortal Kombat vs Street Fighter PC from Verified Platforms</h2>
8
- <p>One of the best ways to download games online is to use verified platforms, which are official and licensed websites that offer games for sale or download. These platforms usually have security features, customer support, user reviews, ratings, refunds, and other services that make downloading games easier and safer. Here are two of the most popular verified platforms for downloading PC games:</p>
9
- <h3>Steam</h3>
10
- <p><a href="(^1^)">Steam</a> is one of the largest and most popular digital distribution platforms for PC games. It has thousands of games for various genres, including fighting games like Mortal Kombat vs Street Fighter PC. Here's how to download the game from Steam:</p>
11
- <p>How to download mortal kombat vs street fighter pc for free<br />
12
- Mortal kombat vs street fighter pc review and gameplay<br />
13
- Best pc fighting games 2023: mortal kombat vs street fighter pc<br />
14
- Mortal kombat vs street fighter pc cheats and tips<br />
15
- Where to buy mortal kombat vs street fighter pc online<br />
16
- Mortal kombat vs street fighter pc system requirements and compatibility<br />
17
- Mortal kombat vs street fighter pc mods and customizations<br />
18
- Mortal kombat vs street fighter pc online multiplayer and tournaments<br />
19
- Mortal kombat vs street fighter pc characters and moves<br />
20
- Mortal kombat vs street fighter pc story and lore<br />
21
- Mortal kombat vs street fighter pc comparison and differences<br />
22
- Mortal kombat vs street fighter pc download size and speed<br />
23
- Mortal kombat vs street fighter pc graphics and sound quality<br />
24
- Mortal kombat vs street fighter pc controller and keyboard support<br />
25
- Mortal kombat vs street fighter pc patch notes and updates<br />
26
- Mortal kombat vs street fighter pc fan art and wallpapers<br />
27
- Mortal kombat vs street fighter pc trivia and facts<br />
28
- Mortal kombat vs street fighter pc ratings and reviews<br />
29
- Mortal kombat vs street fighter pc alternatives and similar games<br />
30
- Mortal kombat vs street fighter pc history and development<br />
31
- How to fix mortal kombat vs street fighter pc errors and bugs<br />
32
- Mortal kombat vs street fighter pc secrets and easter eggs<br />
33
- Mortal kombat vs street fighter pc achievements and trophies<br />
34
- Mortal kombat vs street fighter pc guides and walkthroughs<br />
35
- Mortal kombat vs street fighter pc videos and trailers<br />
36
- How to stream mortal kombat vs street fighter pc on Twitch or YouTube<br />
37
- Mortal kombat vs street fighter pc merchandise and collectibles<br />
38
- Mortal kombat vs street fighter pc memes and jokes<br />
39
- How to play mortal kombat vs street fighter pc with friends<br />
40
- Mortal kombat vs street fighter pc crossover and collaboration<br />
41
- How to improve mortal kombat vs street fighter pc performance and fps<br />
42
- Mortal kombat vs street fighter pc community and forums<br />
43
- Mortal kombat vs street fighter pc soundtrack and music<br />
44
- Mortal kombat vs street fighter pc skins and costumes<br />
45
- Mortal kombat vs street fighter pc features and modes<br />
46
- How to uninstall mortal kombat vs street fighter pc from your computer<br />
47
- Mortal kombat vs street fighter pc rumors and news<br />
48
- Mortal kombat vs street fighter pc challenges and quests<br />
49
- Mortal kombat vs street fighter pc opinions and debates<br />
50
- How to backup mortal kombat vs street fighter pc save files<br />
51
- How to install mortal kombat vs street fighter pc mods from Steam Workshop or Nexus Mods<br />
52
- How to create mortal kombat vs street fighter pc fan fiction or comics<br />
53
- How to cosplay as mortal kombat or street fighter characters from the game<br />
54
- How to make mortal kombat vs street fighter pc fan games or animations<br />
55
- How to learn mortal kombat or street fighter martial arts from the game<br />
56
- How to get mortal kombat or street fighter tattoos or stickers from the game<br />
57
- How to win mortal kombat or street fighter bets or wagers from the game</p>
58
- <ol>
59
- <li>Install Steam and create an account. You can download Steam from its official website for free. Once you install it, you need to create an account with your email address and password. You also need to verify your account through a confirmation email.</li>
60
- <li>Find and purchase Mortal Kombat vs Street Fighter PC on Steam. You can use the search bar or browse by categories to find the game on Steam store. The game costs $19.99, but you can also wait for discounts and sales that happen frequently on Steam. You can pay with various methods, such as credit card, PayPal, or Steam Wallet. Once you purchase the game, it will be added to your library.</li>
61
- <li>Download and install the game on your PC. You can access your library from the Steam app and click on the game to start downloading it. The download size is about 10 GB, so make sure you have enough space and a stable internet connection. After the download is complete, you can install the game by following the instructions on the screen. You can also adjust the settings, such as language, graphics, and controls, according to your preferences.</li>
62
- </ol>
63
- <h3>Epic Games Store</h3>
64
- <p><a href="">Epic Games Store</a> is another popular digital distribution platform for PC games. It is owned by Epic Games, the developer of Fortnite and Unreal Engine. It also has a variety of games for different genres, including fighting games like Mortal Kombat vs Street Fighter PC. Here's how to download the game from Epic Games Store:</p>
65
- <ol>
66
- <li>Install Epic Games Launcher and create an account. You can download Epic Games Launcher from its official website for free. Once you install it, you need to create an account with your email address and password. You also need to verify your account through a confirmation email.</li>
67
- <li>Find and purchase Mortal Kombat vs Street Fighter PC on Epic Games Store. You can use the search bar or browse by categories to find the game on Epic Games Store. The game costs $19.99, but you can also get free games every week from Epic Games Store. You can pay with various methods, such as credit card, PayPal, or Epic Games Wallet. Once you purchase the game, it will be added to your library.</li>
68
- <li>Download and install the game on your PC. You can access your library from the Epic Games Launcher and click on the game to start downloading it. The download size is about 10 GB, so make sure you have enough space and a stable internet connection. After the download is complete, you can install the game by following the instructions on the screen. You can also adjust the settings, such as language, graphics, and controls, according to your preferences.</li>
69
- </ol>
70
- <h2>How to Download Mortal Kombat vs Street Fighter PC Safely</h2>
71
- <p>While downloading games online from verified platforms is generally safe and easy, there are still some things you need to do to ensure a smooth and secure gaming experience. Here are some tips on how to download Mortal Kombat vs Street Fighter PC safely:</p>
72
- <h3>Check your PC specs</h3>
73
- <p>Before you download any game, you need to make sure that your PC meets the minimum and recommended requirements for running the game smoothly and without any issues. Here are the specifications for Mortal Kombat vs Street Fighter PC:</p>
74
- <table>
75
- <tr><th>Minimum Requirements</th><th>Recommended Requirements</th></tr>
76
- <tr><td>OS: Windows 7/8/10 (64-bit)</td><td>OS: Windows 10 (64-bit)</td></tr>
77
- <tr><td>CPU: Intel Core i5-750 or AMD Phenom II X4 965</td><td>CPU: Intel Core i7-3770 or AMD FX-8350</td></tr>
78
- <tr><td>RAM: 4 GB</td><td>RAM: 8 GB</td></tr>
79
- <tr><td>GPU: NVIDIA GeForce GTX 460 or AMD Radeon HD 5850</td><td>GPU: NVIDIA GeForce GTX 660 or AMD Radeon HD 7950</td></tr>
80
- <tr><td>DirectX: Version 11</td><td>DirectX: Version 11</td></tr>
81
- <tr><td>Storage: 20 GB available space</td><td>Storage: 20 GB available space</td></tr>
82
- <tr><td>Sound Card: DirectX compatible soundcard or onboard chipset</td><td>Sound Card: DirectX compatible soundcard or onboard chipset</td></tr>
83
- </table>
84
- <p>To find out your PC's specifications, you can use various methods, such as checking the system information on your PC settings, using a third-party software like Speccy or CPU-Z, or visiting a website like Can You Run It that automatically scans your PC and compares it with the game's requirements.</p>
85
- <p>If your PC does not meet the minimum requirements, you might not be able to run the game at all or face problems like lagging, crashing, freezing, or low graphics quality. If your PC meets or exceeds the recommended requirements, you will be able to run the game smoothly and with high graphics quality.</p>
86
- <h3>Avoid unverified sources</h3 <p>Another important thing to do when downloading games online is to avoid unverified sources, which are unofficial and unlicensed websites or files that offer games for free or cheap. These sources are often unreliable, illegal, and dangerous, as they may contain viruses, malware, spyware, adware, or other harmful software that can damage your PC or steal your personal information. Here are some tips on how to identify and avoid unverified sources:</p>
87
- <ul>
88
- <li>Do not trust websites that have suspicious names, domains, or designs. For example, if a website has a name like "Mortal Kombat vs Street Fighter PC Free Download" or a domain like ".ru" or ".tk", it is likely to be unverified and unsafe. Also, if a website has poor design, grammar, or spelling, it is probably not trustworthy.</li>
89
- <li>Do not download files that have unknown or unusual extensions, sizes, or names. For example, if a file has an extension like ".exe" or ".rar", it is likely to be a malicious executable file that can harm your PC. Also, if a file has a size that is too small or too large for the game, or a name that is different from the game's official name, it is probably not legitimate.</li>
90
- <li>Do not click on links or ads that promise free or cheap games. These links or ads are often scams that can redirect you to unverified sources or phishing sites that can steal your personal information. They may also download unwanted software or malware on your PC without your consent.</li>
91
- <li>Use antivirus software and firewall to protect your PC. Antivirus software can scan and remove any viruses, malware, or other threats that may infect your PC from unverified sources. Firewall can block any unauthorized or suspicious connections or activities on your PC. You should always keep your antivirus software and firewall updated and active.</li>
92
- </ul>
93
- <h3>Follow the game's instructions and terms of service</h3>
94
- <p>The last thing to do when downloading games online is to follow the game's instructions and terms of service, which are the guidelines and rules that the game's developer and publisher provide for installing and playing the game. These instructions and terms of service are designed to ensure the game's quality, performance, compatibility, and legality. Here are some tips on how to follow the game's instructions and terms of service:</p>
95
- <ul>
96
- <li>Read and follow the game's installation guide and user agreement. The installation guide is a document that explains how to install and run the game on your PC. The user agreement is a contract that defines your rights and responsibilities as a user of the game. You should read and follow these documents carefully before installing and playing the game.</li>
97
- <li>Respect the game's intellectual property rights and avoid piracy. The game's intellectual property rights are the legal rights that the game's developer and publisher have over the game's content, such as characters, graphics, music, story, etc. Piracy is the illegal copying, distribution, or use of the game without permission or payment. You should respect the game's intellectual property rights and avoid piracy by purchasing the game from verified platforms, not sharing the game with others without authorization, not modifying the game without permission, and not using the game for commercial purposes.</li>
98
- </ul>
99
- <h2>Conclusion</h2>
100
- <p>In this article, we have shown you how to download Mortal Kombat vs Street Fighter PC from verified platforms, how to check your PC specs, how to avoid unverified sources, and how to follow the game's instructions and terms of service. By following these steps, you will be able to download this awesome fighting game on your PC safely and legally.</p>
101
- <p>Mortal Kombat vs Street Fighter PC is a fan-made crossover game that combines two of the most iconic franchises in the fighting genre. It features over 40 characters from both Mortal Kombat and Street Fighter universes, and various modes, stages , and moves. It is a great game for fans of both series, as well as for anyone who loves fighting games in general. It has high-quality graphics, sound, and gameplay, and it is compatible with most PC systems.</p>
102
- <p>Here are some tips and tricks for enjoying the game:</p>
103
- <ul>
104
- <li>Experiment with different characters and combinations. Each character has their own strengths, weaknesses, and special moves. You can mix and match characters from both universes to create your own team and strategy.</li>
105
- <li>Practice your skills and learn new moves. The game has a training mode where you can practice your combos, timing, and execution. You can also learn new moves by watching the move list or the demonstration videos.</li>
106
- <li>Challenge yourself and others. The game has various difficulty levels and modes, such as arcade, survival, versus, and team battle. You can also play online with other players from around the world, or locally with your friends.</li>
107
- </ul>
108
- <p>We hope you found this article helpful and informative. If you have any feedback or questions, please feel free to leave a comment below. We would love to hear from you. Happy gaming!</p>
109
- <h2>FAQs</h2>
110
- <p>Here are some frequently asked questions about Mortal Kombat vs Street Fighter PC:</p>
111
- <h3>What are some other verified platforms for downloading PC games?</h3>
112
- <p>Some other verified platforms for downloading PC games are GOG.com, Origin, Uplay, Humble Bundle, itch.io, and Microsoft Store. These platforms also offer a variety of games for different genres and preferences.</p>
113
- <h3>What are some other popular fighting games for PC?</h3>
114
- <p>Some other popular fighting games for PC are Tekken 7, Street Fighter V, Mortal Kombat 11, Dragon Ball FighterZ, Injustice 2, Soulcalibur VI, Guilty Gear Strive, and BlazBlue: Cross Tag Battle. These games also feature different characters, modes, and mechanics.</p>
115
- <h3>What are some of the features and modes of Mortal Kombat vs Street Fighter PC?</h3>
116
- <p>Some of the features and modes of Mortal Kombat vs Street Fighter PC are:</p>
117
- <ul>
118
- <li>A roster of over 40 characters from both Mortal Kombat and Street Fighter universes, each with their own unique moves and abilities.</li>
119
- <li>A variety of stages from both series, each with their own background music and interactive elements.</li>
120
- <li>A selection of modes, such as arcade, survival, versus, team battle, training, online multiplayer, and options.</li>
121
- <li>A customization system that allows you to change your character's appearance, voice, color, costume, intro, outro, victory pose, taunt, and icon.</li>
122
- <li>A ranking system that tracks your progress and performance in the game.</li>
123
- </ul>
124
- <h3>How can I play Mortal Kombat vs Street Fighter PC online with other players?</h3 <p>You can play Mortal Kombat vs Street Fighter PC online with other players by using the online multiplayer mode. This mode allows you to join or create a lobby, where you can chat, invite, and challenge other players. You can also choose the region, rules, and settings of the lobby. You can also join or create a ranked match, where you can compete with other players for points and ranks. You can also view your stats, leaderboards, and replays in the online mode.</p>
125
- <h3>How can I customize my characters and settings in Mortal Kombat vs Street Fighter PC?</h3>
126
- <p>You can customize your characters and settings in Mortal Kombat vs Street Fighter PC by using the options mode. This mode allows you to change various aspects of the game, such as:</p>
127
- <ul>
128
- <li>Your character's appearance, voice, color, costume, intro, outro, victory pose, taunt, and icon. You can unlock more options by playing the game and earning coins.</li>
129
- <li>Your game's language, graphics, sound, controls, and display. You can adjust these options according to your preferences and PC specs.</li>
130
- <li>Your game's difficulty, time limit, rounds, damage, and blood. You can modify these options to make the game easier or harder.</li>
131
- </ul></p> 401be4b1e0<br />
132
- <br />
133
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/2023Liu2023/bingo/src/components/button-scroll-to-bottom.tsx DELETED
@@ -1,34 +0,0 @@
1
- 'use client'
2
-
3
- import * as React from 'react'
4
-
5
- import { cn } from '@/lib/utils'
6
- import { useAtBottom } from '@/lib/hooks/use-at-bottom'
7
- import { Button, type ButtonProps } from '@/components/ui/button'
8
- import { IconArrowDown } from '@/components/ui/icons'
9
-
10
- export function ButtonScrollToBottom({ className, ...props }: ButtonProps) {
11
- const isAtBottom = useAtBottom()
12
-
13
- return (
14
- <Button
15
- variant="outline"
16
- size="icon"
17
- className={cn(
18
- 'fixed right-4 bottom-24 z-50 bg-background transition-opacity duration-300 sm:right-20',
19
- isAtBottom ? 'opacity-0' : 'opacity-100',
20
- className
21
- )}
22
- onClick={() =>
23
- window.scrollTo({
24
- top: document.body.offsetHeight,
25
- behavior: 'smooth'
26
- })
27
- }
28
- {...props}
29
- >
30
- <IconArrowDown />
31
- <span className="sr-only">Scroll to bottom</span>
32
- </Button>
33
- )
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/232labs/VToonify/vtoonify/model/bisenet/model.py DELETED
@@ -1,283 +0,0 @@
1
- #!/usr/bin/python
2
- # -*- encoding: utf-8 -*-
3
-
4
-
5
- import torch
6
- import torch.nn as nn
7
- import torch.nn.functional as F
8
- import torchvision
9
-
10
- from model.bisenet.resnet import Resnet18
11
- # from modules.bn import InPlaceABNSync as BatchNorm2d
12
-
13
-
14
- class ConvBNReLU(nn.Module):
15
- def __init__(self, in_chan, out_chan, ks=3, stride=1, padding=1, *args, **kwargs):
16
- super(ConvBNReLU, self).__init__()
17
- self.conv = nn.Conv2d(in_chan,
18
- out_chan,
19
- kernel_size = ks,
20
- stride = stride,
21
- padding = padding,
22
- bias = False)
23
- self.bn = nn.BatchNorm2d(out_chan)
24
- self.init_weight()
25
-
26
- def forward(self, x):
27
- x = self.conv(x)
28
- x = F.relu(self.bn(x))
29
- return x
30
-
31
- def init_weight(self):
32
- for ly in self.children():
33
- if isinstance(ly, nn.Conv2d):
34
- nn.init.kaiming_normal_(ly.weight, a=1)
35
- if not ly.bias is None: nn.init.constant_(ly.bias, 0)
36
-
37
- class BiSeNetOutput(nn.Module):
38
- def __init__(self, in_chan, mid_chan, n_classes, *args, **kwargs):
39
- super(BiSeNetOutput, self).__init__()
40
- self.conv = ConvBNReLU(in_chan, mid_chan, ks=3, stride=1, padding=1)
41
- self.conv_out = nn.Conv2d(mid_chan, n_classes, kernel_size=1, bias=False)
42
- self.init_weight()
43
-
44
- def forward(self, x):
45
- x = self.conv(x)
46
- x = self.conv_out(x)
47
- return x
48
-
49
- def init_weight(self):
50
- for ly in self.children():
51
- if isinstance(ly, nn.Conv2d):
52
- nn.init.kaiming_normal_(ly.weight, a=1)
53
- if not ly.bias is None: nn.init.constant_(ly.bias, 0)
54
-
55
- def get_params(self):
56
- wd_params, nowd_params = [], []
57
- for name, module in self.named_modules():
58
- if isinstance(module, nn.Linear) or isinstance(module, nn.Conv2d):
59
- wd_params.append(module.weight)
60
- if not module.bias is None:
61
- nowd_params.append(module.bias)
62
- elif isinstance(module, nn.BatchNorm2d):
63
- nowd_params += list(module.parameters())
64
- return wd_params, nowd_params
65
-
66
-
67
- class AttentionRefinementModule(nn.Module):
68
- def __init__(self, in_chan, out_chan, *args, **kwargs):
69
- super(AttentionRefinementModule, self).__init__()
70
- self.conv = ConvBNReLU(in_chan, out_chan, ks=3, stride=1, padding=1)
71
- self.conv_atten = nn.Conv2d(out_chan, out_chan, kernel_size= 1, bias=False)
72
- self.bn_atten = nn.BatchNorm2d(out_chan)
73
- self.sigmoid_atten = nn.Sigmoid()
74
- self.init_weight()
75
-
76
- def forward(self, x):
77
- feat = self.conv(x)
78
- atten = F.avg_pool2d(feat, feat.size()[2:])
79
- atten = self.conv_atten(atten)
80
- atten = self.bn_atten(atten)
81
- atten = self.sigmoid_atten(atten)
82
- out = torch.mul(feat, atten)
83
- return out
84
-
85
- def init_weight(self):
86
- for ly in self.children():
87
- if isinstance(ly, nn.Conv2d):
88
- nn.init.kaiming_normal_(ly.weight, a=1)
89
- if not ly.bias is None: nn.init.constant_(ly.bias, 0)
90
-
91
-
92
- class ContextPath(nn.Module):
93
- def __init__(self, *args, **kwargs):
94
- super(ContextPath, self).__init__()
95
- self.resnet = Resnet18()
96
- self.arm16 = AttentionRefinementModule(256, 128)
97
- self.arm32 = AttentionRefinementModule(512, 128)
98
- self.conv_head32 = ConvBNReLU(128, 128, ks=3, stride=1, padding=1)
99
- self.conv_head16 = ConvBNReLU(128, 128, ks=3, stride=1, padding=1)
100
- self.conv_avg = ConvBNReLU(512, 128, ks=1, stride=1, padding=0)
101
-
102
- self.init_weight()
103
-
104
- def forward(self, x):
105
- H0, W0 = x.size()[2:]
106
- feat8, feat16, feat32 = self.resnet(x)
107
- H8, W8 = feat8.size()[2:]
108
- H16, W16 = feat16.size()[2:]
109
- H32, W32 = feat32.size()[2:]
110
-
111
- avg = F.avg_pool2d(feat32, feat32.size()[2:])
112
- avg = self.conv_avg(avg)
113
- avg_up = F.interpolate(avg, (H32, W32), mode='nearest')
114
-
115
- feat32_arm = self.arm32(feat32)
116
- feat32_sum = feat32_arm + avg_up
117
- feat32_up = F.interpolate(feat32_sum, (H16, W16), mode='nearest')
118
- feat32_up = self.conv_head32(feat32_up)
119
-
120
- feat16_arm = self.arm16(feat16)
121
- feat16_sum = feat16_arm + feat32_up
122
- feat16_up = F.interpolate(feat16_sum, (H8, W8), mode='nearest')
123
- feat16_up = self.conv_head16(feat16_up)
124
-
125
- return feat8, feat16_up, feat32_up # x8, x8, x16
126
-
127
- def init_weight(self):
128
- for ly in self.children():
129
- if isinstance(ly, nn.Conv2d):
130
- nn.init.kaiming_normal_(ly.weight, a=1)
131
- if not ly.bias is None: nn.init.constant_(ly.bias, 0)
132
-
133
- def get_params(self):
134
- wd_params, nowd_params = [], []
135
- for name, module in self.named_modules():
136
- if isinstance(module, (nn.Linear, nn.Conv2d)):
137
- wd_params.append(module.weight)
138
- if not module.bias is None:
139
- nowd_params.append(module.bias)
140
- elif isinstance(module, nn.BatchNorm2d):
141
- nowd_params += list(module.parameters())
142
- return wd_params, nowd_params
143
-
144
-
145
- ### This is not used, since I replace this with the resnet feature with the same size
146
- class SpatialPath(nn.Module):
147
- def __init__(self, *args, **kwargs):
148
- super(SpatialPath, self).__init__()
149
- self.conv1 = ConvBNReLU(3, 64, ks=7, stride=2, padding=3)
150
- self.conv2 = ConvBNReLU(64, 64, ks=3, stride=2, padding=1)
151
- self.conv3 = ConvBNReLU(64, 64, ks=3, stride=2, padding=1)
152
- self.conv_out = ConvBNReLU(64, 128, ks=1, stride=1, padding=0)
153
- self.init_weight()
154
-
155
- def forward(self, x):
156
- feat = self.conv1(x)
157
- feat = self.conv2(feat)
158
- feat = self.conv3(feat)
159
- feat = self.conv_out(feat)
160
- return feat
161
-
162
- def init_weight(self):
163
- for ly in self.children():
164
- if isinstance(ly, nn.Conv2d):
165
- nn.init.kaiming_normal_(ly.weight, a=1)
166
- if not ly.bias is None: nn.init.constant_(ly.bias, 0)
167
-
168
- def get_params(self):
169
- wd_params, nowd_params = [], []
170
- for name, module in self.named_modules():
171
- if isinstance(module, nn.Linear) or isinstance(module, nn.Conv2d):
172
- wd_params.append(module.weight)
173
- if not module.bias is None:
174
- nowd_params.append(module.bias)
175
- elif isinstance(module, nn.BatchNorm2d):
176
- nowd_params += list(module.parameters())
177
- return wd_params, nowd_params
178
-
179
-
180
- class FeatureFusionModule(nn.Module):
181
- def __init__(self, in_chan, out_chan, *args, **kwargs):
182
- super(FeatureFusionModule, self).__init__()
183
- self.convblk = ConvBNReLU(in_chan, out_chan, ks=1, stride=1, padding=0)
184
- self.conv1 = nn.Conv2d(out_chan,
185
- out_chan//4,
186
- kernel_size = 1,
187
- stride = 1,
188
- padding = 0,
189
- bias = False)
190
- self.conv2 = nn.Conv2d(out_chan//4,
191
- out_chan,
192
- kernel_size = 1,
193
- stride = 1,
194
- padding = 0,
195
- bias = False)
196
- self.relu = nn.ReLU(inplace=True)
197
- self.sigmoid = nn.Sigmoid()
198
- self.init_weight()
199
-
200
- def forward(self, fsp, fcp):
201
- fcat = torch.cat([fsp, fcp], dim=1)
202
- feat = self.convblk(fcat)
203
- atten = F.avg_pool2d(feat, feat.size()[2:])
204
- atten = self.conv1(atten)
205
- atten = self.relu(atten)
206
- atten = self.conv2(atten)
207
- atten = self.sigmoid(atten)
208
- feat_atten = torch.mul(feat, atten)
209
- feat_out = feat_atten + feat
210
- return feat_out
211
-
212
- def init_weight(self):
213
- for ly in self.children():
214
- if isinstance(ly, nn.Conv2d):
215
- nn.init.kaiming_normal_(ly.weight, a=1)
216
- if not ly.bias is None: nn.init.constant_(ly.bias, 0)
217
-
218
- def get_params(self):
219
- wd_params, nowd_params = [], []
220
- for name, module in self.named_modules():
221
- if isinstance(module, nn.Linear) or isinstance(module, nn.Conv2d):
222
- wd_params.append(module.weight)
223
- if not module.bias is None:
224
- nowd_params.append(module.bias)
225
- elif isinstance(module, nn.BatchNorm2d):
226
- nowd_params += list(module.parameters())
227
- return wd_params, nowd_params
228
-
229
-
230
- class BiSeNet(nn.Module):
231
- def __init__(self, n_classes, *args, **kwargs):
232
- super(BiSeNet, self).__init__()
233
- self.cp = ContextPath()
234
- ## here self.sp is deleted
235
- self.ffm = FeatureFusionModule(256, 256)
236
- self.conv_out = BiSeNetOutput(256, 256, n_classes)
237
- self.conv_out16 = BiSeNetOutput(128, 64, n_classes)
238
- self.conv_out32 = BiSeNetOutput(128, 64, n_classes)
239
- self.init_weight()
240
-
241
- def forward(self, x):
242
- H, W = x.size()[2:]
243
- feat_res8, feat_cp8, feat_cp16 = self.cp(x) # here return res3b1 feature
244
- feat_sp = feat_res8 # use res3b1 feature to replace spatial path feature
245
- feat_fuse = self.ffm(feat_sp, feat_cp8)
246
-
247
- feat_out = self.conv_out(feat_fuse)
248
- feat_out16 = self.conv_out16(feat_cp8)
249
- feat_out32 = self.conv_out32(feat_cp16)
250
-
251
- feat_out = F.interpolate(feat_out, (H, W), mode='bilinear', align_corners=True)
252
- feat_out16 = F.interpolate(feat_out16, (H, W), mode='bilinear', align_corners=True)
253
- feat_out32 = F.interpolate(feat_out32, (H, W), mode='bilinear', align_corners=True)
254
- return feat_out, feat_out16, feat_out32
255
-
256
- def init_weight(self):
257
- for ly in self.children():
258
- if isinstance(ly, nn.Conv2d):
259
- nn.init.kaiming_normal_(ly.weight, a=1)
260
- if not ly.bias is None: nn.init.constant_(ly.bias, 0)
261
-
262
- def get_params(self):
263
- wd_params, nowd_params, lr_mul_wd_params, lr_mul_nowd_params = [], [], [], []
264
- for name, child in self.named_children():
265
- child_wd_params, child_nowd_params = child.get_params()
266
- if isinstance(child, FeatureFusionModule) or isinstance(child, BiSeNetOutput):
267
- lr_mul_wd_params += child_wd_params
268
- lr_mul_nowd_params += child_nowd_params
269
- else:
270
- wd_params += child_wd_params
271
- nowd_params += child_nowd_params
272
- return wd_params, nowd_params, lr_mul_wd_params, lr_mul_nowd_params
273
-
274
-
275
- if __name__ == "__main__":
276
- net = BiSeNet(19)
277
- net.cuda()
278
- net.eval()
279
- in_ten = torch.randn(16, 3, 640, 480).cuda()
280
- out, out16, out32 = net(in_ten)
281
- print(out.shape)
282
-
283
- net.get_params()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AIConsultant/MusicGen/audiocraft/utils/cache.py DELETED
@@ -1,323 +0,0 @@
1
- # Copyright (c) Meta Platforms, Inc. and affiliates.
2
- # All rights reserved.
3
- #
4
- # This source code is licensed under the license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
- from concurrent.futures import ThreadPoolExecutor
8
- from collections import deque
9
- from functools import partial
10
- from hashlib import sha1
11
- import logging
12
- from pathlib import Path
13
- import sys
14
- import typing as tp
15
- import zipfile
16
-
17
- import flashy
18
- import torch
19
-
20
-
21
- logger = logging.getLogger(__name__)
22
-
23
-
24
- def get_full_embed(full_embed: torch.Tensor, x: tp.Any, idx: int, device: tp.Union[str, torch.device]) -> torch.Tensor:
25
- """Utility function for the EmbeddingCache, returning the full embedding without any chunking.
26
- This method can be used in case there is no need in extracting a chunk of the full embedding
27
- read from the cache.
28
-
29
- Args:
30
- full_embed (torch.Tensor): The full embedding.
31
- x (any): Batch object from which the full embedding is derived.
32
- idx (torch.Tensor): Index of object to consider in the batch object.
33
- Returns:
34
- full_embed (torch.Tensor): The full embedding
35
- """
36
- return full_embed.to(device)
37
-
38
-
39
- class EmbeddingCache:
40
- """Cache around embeddings computation for faster execution.
41
- The EmbeddingCache is storing pre-computed embeddings on disk and provides a simple API
42
- to retrieve the pre-computed embeddings on full inputs and extract only a given chunk
43
- using a user-provided function. When the cache is warm (all embeddings are pre-computed),
44
- the EmbeddingCache allows for faster training as it removes the need of computing the embeddings.
45
- Additionally, it provides in-memory cache around the loaded embeddings to limit IO footprint
46
- and synchronization points in the forward calls.
47
-
48
- Args:
49
- cache_path (Path): Path to folder where all pre-computed embeddings are saved on disk.
50
- device (str or torch.device): Device on which the embedding is returned.
51
- compute_embed_fn (callable[[Path, any, int], torch.Tensor], optional): Function to compute
52
- the embedding from a given object and path. This user provided function can compute the
53
- embedding from the provided object or using the provided path as entry point. The last parameter
54
- specify the index corresponding to the current embedding in the object that can represent batch metadata.
55
- extract_embed_fn (callable[[torch.Tensor, any, int], torch.Tensor], optional): Function to extract
56
- the desired embedding chunk from the full embedding loaded from the cache. The last parameter
57
- specify the index corresponding to the current embedding in the object that can represent batch metadata.
58
- If not specified, will return the full embedding unmodified.
59
- """
60
- def __init__(self, cache_path: tp.Union[Path], device: tp.Union[str, torch.device],
61
- compute_embed_fn: tp.Callable[[Path, tp.Any, int], torch.Tensor],
62
- extract_embed_fn: tp.Optional[tp.Callable[[torch.Tensor, tp.Any, int], torch.Tensor]] = None):
63
- self.cache_path = Path(cache_path)
64
- self.device = device
65
- self._compute_embed_fn = compute_embed_fn
66
- self._extract_embed_fn: tp.Callable[[torch.Tensor, tp.Any, int], torch.Tensor]
67
- if extract_embed_fn is not None:
68
- self._extract_embed_fn = extract_embed_fn
69
- else:
70
- self._extract_embed_fn = partial(get_full_embed, device=device)
71
- if self.cache_path is not None:
72
- self.cache_path.mkdir(exist_ok=True, parents=True)
73
- logger.info(f"Cache instantiated at: {self.cache_path}")
74
- self.pool = ThreadPoolExecutor(8)
75
- self.pool.__enter__()
76
- self._current_batch_cache: dict = {}
77
- self._memory_cache: dict = {}
78
-
79
- def _get_cache_path(self, path: tp.Union[Path, str]):
80
- """Get cache path for the given file path."""
81
- sig = sha1(str(path).encode()).hexdigest()
82
- return self.cache_path / sig
83
-
84
- @staticmethod
85
- def _get_full_embed_from_cache(cache: Path):
86
- """Loads full pre-computed embedding from the cache."""
87
- try:
88
- embed = torch.load(cache, 'cpu')
89
- except Exception as exc:
90
- logger.error("Error loading %s: %r", cache, exc)
91
- embed = None
92
- return embed
93
-
94
- def get_embed_from_cache(self, paths: tp.List[Path], x: tp.Any) -> torch.Tensor:
95
- """Get embedding from cache, computing and storing it to cache if not already cached.
96
- The EmbeddingCache first tries to load the embedding from the in-memory cache
97
- containing the pre-computed chunks populated through `populate_embed_cache`.
98
- If not found, the full embedding is computed and stored on disk to be later accessed
99
- to populate the in-memory cache, and the desired embedding chunk is extracted and returned.
100
-
101
- Args:
102
- paths (list[Path or str]): List of paths from where the embeddings can be loaded.
103
- x (any): Object from which the embedding is extracted.
104
- """
105
- embeds = []
106
- for idx, path in enumerate(paths):
107
- cache = self._get_cache_path(path)
108
- if cache in self._current_batch_cache:
109
- embed = self._current_batch_cache[cache]
110
- else:
111
- full_embed = self._compute_embed_fn(path, x, idx)
112
- try:
113
- with flashy.utils.write_and_rename(cache, pid=True) as f:
114
- torch.save(full_embed.cpu(), f)
115
- except Exception as exc:
116
- logger.error('Error saving embed %s (%s): %r', cache, full_embed.shape, exc)
117
- else:
118
- logger.info('New embed cache saved: %s (%s)', cache, full_embed.shape)
119
- embed = self._extract_embed_fn(full_embed, x, idx)
120
- embeds.append(embed)
121
- embed = torch.stack(embeds, dim=0)
122
- return embed
123
-
124
- def populate_embed_cache(self, paths: tp.List[Path], x: tp.Any) -> None:
125
- """Populate in-memory caches for embeddings reading from the embeddings stored on disk.
126
- The in-memory caches consist in a cache for the full embedding and another cache for the
127
- final embedding chunk. Such caches are used to limit the IO access when computing the actual embeddings
128
- and reduce the IO footprint and synchronization points during forward passes.
129
-
130
- Args:
131
- paths (list[Path]): List of paths from where the embeddings can be loaded.
132
- x (any): Object from which the embedding is extracted.
133
- """
134
- self._current_batch_cache.clear()
135
- if self.cache_path is not None:
136
- futures: list = []
137
- for path in paths:
138
- assert path is not None, "Path is required for computation from cache"
139
- cache = self._get_cache_path(path)
140
- if cache in self._memory_cache or not cache.exists():
141
- futures.append(None)
142
- else:
143
- futures.append(self.pool.submit(EmbeddingCache._get_full_embed_from_cache, cache))
144
- for idx, (path, future) in enumerate(zip(paths, futures)):
145
- assert path is not None
146
- cache = self._get_cache_path(path)
147
- full_embed = None
148
- if future is None:
149
- if cache in self._memory_cache:
150
- full_embed = self._memory_cache[cache]
151
- else:
152
- full_embed = future.result()
153
- if full_embed is not None:
154
- self._memory_cache[cache] = full_embed
155
- full_embed = full_embed.to(self.device)
156
- if full_embed is not None:
157
- embed = self._extract_embed_fn(full_embed, x, idx)
158
- self._current_batch_cache[cache] = embed
159
-
160
-
161
- class CachedBatchWriter:
162
- """Write pre computed caches for mini batches. This can
163
- make loading a lot more efficient depending on your filesystem.
164
-
165
- Args:
166
- cache_folder (Path): folder in which the cached minibatches
167
- will be stored.
168
-
169
- Inside cache folder, the structure is the following:
170
- `epoch_number / update_number.zip`
171
- And the zip file contains one entry per batch item.
172
-
173
- It is possible to use the cache with a batch size smaller than
174
- created with but obviously not larger. Make sure to call the
175
- `start_epoch(epoch)` method for indicating changes of epochs.
176
-
177
- See the grid `audiocraft/grids/musicgen/musicgen_warmup_cache.py`
178
- for an example of how to warmup the cache.
179
- """
180
- def __init__(self, cache_folder: Path):
181
- self.cache_folder = cache_folder
182
- self._current_epoch: tp.Optional[int] = None
183
- self._current_index = 0
184
-
185
- def start_epoch(self, epoch: int):
186
- """Call at the beginning of each epoch.
187
- """
188
- self._current_epoch = epoch
189
- self._current_index = 0
190
- self._zip_path.parent.mkdir(exist_ok=True, parents=True)
191
-
192
- @staticmethod
193
- def _get_zip_path(cache_folder: Path, epoch: int, index: int):
194
- return cache_folder / f"{epoch:05d}" / f"{index:06d}.zip"
195
-
196
- @property
197
- def _zip_path(self):
198
- assert self._current_epoch is not None
199
- return CachedBatchWriter._get_zip_path(self.cache_folder, self._current_epoch, self._current_index)
200
-
201
- def save(self, *content):
202
- """Save one mini batch. This function is distributed-aware
203
- and will automatically merge all the items from the different
204
- workers.
205
- """
206
- all_contents = []
207
- for rank in range(flashy.distrib.world_size()):
208
- their_content = flashy.distrib.broadcast_object(content, src=rank)
209
- all_contents.append(their_content)
210
-
211
- if flashy.distrib.is_rank_zero():
212
- idx = 0
213
- with flashy.utils.write_and_rename(self._zip_path) as tmp:
214
- with zipfile.ZipFile(tmp, 'w') as zf:
215
- for content in all_contents:
216
- for vals in zip(*content):
217
- with zf.open(f'{idx}', 'w') as f: # type: ignore
218
- torch.save(vals, f)
219
- idx += 1
220
- flashy.distrib.barrier()
221
- self._current_index += 1
222
-
223
-
224
- class CachedBatchLoader:
225
- """Loader for cached mini-batches dumped with `CachedBatchWriter`.
226
-
227
- Args:
228
- cache_folder (Path): folder in which the cached minibatches are stored.
229
- batch_size (int): batch size (per GPU) expected.
230
- num_workers (int): number of workers to use for loading.
231
- min_length (int): minimum expected length for each epoch. If some
232
- mini-batches are missing, and error is raised.
233
-
234
- This is iterable just like a regular DataLoader.
235
- """
236
-
237
- def __init__(self, cache_folder: Path, batch_size: int,
238
- num_workers: int = 10, min_length: int = 1):
239
- self.cache_folder = cache_folder
240
- self.batch_size = batch_size
241
- self.num_workers = num_workers
242
- self.min_length = min_length
243
- self._current_epoch: tp.Optional[int] = None
244
- self.sampler = None # for compatibility with the regular DataLoader
245
-
246
- def __len__(self):
247
- path = CachedBatchWriter._get_zip_path(self.cache_folder, self._current_epoch or 0, 0).parent
248
- return len([p for p in path.iterdir() if p.suffix == ".zip"])
249
-
250
- def start_epoch(self, epoch: int):
251
- """Call at the beginning of each epoch.
252
- """
253
- self._current_epoch = epoch
254
-
255
- def _zip_path(self, index: int):
256
- assert self._current_epoch is not None
257
- return CachedBatchWriter._get_zip_path(self.cache_folder, self._current_epoch, index)
258
-
259
- def _load_one(self, index: int):
260
- zip_path = self._zip_path(index)
261
- if not zip_path.exists():
262
- if index < self.min_length:
263
- raise RuntimeError(f"Cache should have at least {self.min_length} batches, but {index} doesn't exist")
264
-
265
- return None
266
- mode = "rb" if sys.version_info >= (3, 9) else "r"
267
- try:
268
- with zipfile.ZipFile(zip_path, 'r') as zf:
269
- rank = flashy.distrib.rank()
270
- world_size = flashy.distrib.world_size()
271
- root = zipfile.Path(zf)
272
- items = list(root.iterdir())
273
- total_batch_size = self.batch_size * world_size
274
- if len(items) < total_batch_size:
275
- raise RuntimeError(
276
- f"The cache can handle a max batch size of {len(items)}, "
277
- f"but {total_batch_size} is needed.")
278
- start = rank * self.batch_size
279
- items = items[start: start + self.batch_size]
280
- assert len(items) == self.batch_size
281
- entries = []
282
- entries = [torch.load(item.open(mode), 'cpu') for item in items] # type: ignore
283
- transposed = zip(*entries)
284
- out = []
285
- for part in transposed:
286
- assert len(part) > 0
287
- if isinstance(part[0], torch.Tensor):
288
- out.append(torch.stack(part))
289
- else:
290
- out.append(part)
291
- return out
292
- except Exception:
293
- logger.error("Error when reading zip path %s", zip_path)
294
- raise
295
-
296
- def __iter__(self):
297
- """This will yields tuples, exactly as provided to the
298
- `CachedBatchWriter.save` method.
299
- """
300
- pool = ThreadPoolExecutor(self.num_workers)
301
- next_index = 0
302
- queue = deque()
303
-
304
- def _get_next():
305
- nonlocal next_index
306
- r = queue.popleft().result()
307
- if r is None:
308
- return None
309
- else:
310
- queue.append(pool.submit(self._load_one, next_index))
311
- next_index += 1
312
- return r
313
-
314
- with pool:
315
- # fill the buffer of fetching jobs.
316
- for _ in range(2 * self.num_workers):
317
- queue.append(pool.submit(self._load_one, next_index))
318
- next_index += 1
319
- while True:
320
- batch = _get_next()
321
- if batch is None:
322
- return
323
- yield batch
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AIGC-Audio/AudioGPT/text_to_audio/Make_An_Audio/ldm/util.py DELETED
@@ -1,136 +0,0 @@
1
- import importlib
2
-
3
- import torch
4
- import numpy as np
5
- from tqdm import tqdm
6
- from inspect import isfunction
7
- from PIL import Image, ImageDraw, ImageFont
8
- import hashlib
9
- import requests
10
- import os
11
-
12
- URL_MAP = {
13
- 'vggishish_lpaps': 'https://a3s.fi/swift/v1/AUTH_a235c0f452d648828f745589cde1219a/specvqgan_public/vggishish16.pt',
14
- 'vggishish_mean_std_melspec_10s_22050hz': 'https://a3s.fi/swift/v1/AUTH_a235c0f452d648828f745589cde1219a/specvqgan_public/train_means_stds_melspec_10s_22050hz.txt',
15
- 'melception': 'https://a3s.fi/swift/v1/AUTH_a235c0f452d648828f745589cde1219a/specvqgan_public/melception-21-05-10T09-28-40.pt',
16
- }
17
-
18
- CKPT_MAP = {
19
- 'vggishish_lpaps': 'vggishish16.pt',
20
- 'vggishish_mean_std_melspec_10s_22050hz': 'train_means_stds_melspec_10s_22050hz.txt',
21
- 'melception': 'melception-21-05-10T09-28-40.pt',
22
- }
23
-
24
- MD5_MAP = {
25
- 'vggishish_lpaps': '197040c524a07ccacf7715d7080a80bd',
26
- 'vggishish_mean_std_melspec_10s_22050hz': 'f449c6fd0e248936c16f6d22492bb625',
27
- 'melception': 'a71a41041e945b457c7d3d814bbcf72d',
28
- }
29
-
30
-
31
- def download(url, local_path, chunk_size=1024):
32
- os.makedirs(os.path.split(local_path)[0], exist_ok=True)
33
- with requests.get(url, stream=True) as r:
34
- total_size = int(r.headers.get("content-length", 0))
35
- with tqdm(total=total_size, unit="B", unit_scale=True) as pbar:
36
- with open(local_path, "wb") as f:
37
- for data in r.iter_content(chunk_size=chunk_size):
38
- if data:
39
- f.write(data)
40
- pbar.update(chunk_size)
41
-
42
-
43
- def md5_hash(path):
44
- with open(path, "rb") as f:
45
- content = f.read()
46
- return hashlib.md5(content).hexdigest()
47
-
48
-
49
-
50
- def log_txt_as_img(wh, xc, size=10):
51
- # wh a tuple of (width, height)
52
- # xc a list of captions to plot
53
- b = len(xc)
54
- txts = list()
55
- for bi in range(b):
56
- txt = Image.new("RGB", wh, color="white")
57
- draw = ImageDraw.Draw(txt)
58
- font = ImageFont.truetype('data/DejaVuSans.ttf', size=size)
59
- nc = int(40 * (wh[0] / 256))
60
- lines = "\n".join(xc[bi][start:start + nc] for start in range(0, len(xc[bi]), nc))
61
-
62
- try:
63
- draw.text((0, 0), lines, fill="black", font=font)
64
- except UnicodeEncodeError:
65
- print("Cant encode string for logging. Skipping.")
66
-
67
- txt = np.array(txt).transpose(2, 0, 1) / 127.5 - 1.0
68
- txts.append(txt)
69
- txts = np.stack(txts)
70
- txts = torch.tensor(txts)
71
- return txts
72
-
73
-
74
- def ismap(x):
75
- if not isinstance(x, torch.Tensor):
76
- return False
77
- return (len(x.shape) == 4) and (x.shape[1] > 3)
78
-
79
-
80
- def isimage(x):
81
- if not isinstance(x,torch.Tensor):
82
- return False
83
- return (len(x.shape) == 4) and (x.shape[1] == 3 or x.shape[1] == 1)
84
-
85
-
86
- def exists(x):
87
- return x is not None
88
-
89
-
90
- def default(val, d):
91
- if exists(val):
92
- return val
93
- return d() if isfunction(d) else d
94
-
95
-
96
- def mean_flat(tensor):
97
- """
98
- https://github.com/openai/guided-diffusion/blob/27c20a8fab9cb472df5d6bdd6c8d11c8f430b924/guided_diffusion/nn.py#L86
99
- Take the mean over all non-batch dimensions.
100
- """
101
- return tensor.mean(dim=list(range(1, len(tensor.shape))))
102
-
103
-
104
- def count_params(model, verbose=False):
105
- total_params = sum(p.numel() for p in model.parameters())
106
- if verbose:
107
- print(f"{model.__class__.__name__} has {total_params*1.e-6:.2f} M params.")
108
- return total_params
109
-
110
-
111
- def instantiate_from_config(config,reload=False):
112
- if not "target" in config:
113
- if config == '__is_first_stage__':
114
- return None
115
- elif config == "__is_unconditional__":
116
- return None
117
- raise KeyError("Expected key `target` to instantiate.")
118
- return get_obj_from_str(config["target"],reload=reload)(**config.get("params", dict()))
119
-
120
-
121
- def get_obj_from_str(string, reload=False):
122
- module, cls = string.rsplit(".", 1)
123
- if reload:
124
- module_imp = importlib.import_module(module)
125
- importlib.reload(module_imp)
126
- return getattr(importlib.import_module(module, package=None), cls)
127
-
128
- def get_ckpt_path(name, root, check=False):
129
- assert name in URL_MAP
130
- path = os.path.join(root, CKPT_MAP[name])
131
- if not os.path.exists(path) or (check and not md5_hash(path) == MD5_MAP[name]):
132
- print("Downloading {} model from {} to {}".format(name, URL_MAP[name], path))
133
- download(URL_MAP[name], path)
134
- md5 = md5_hash(path)
135
- assert md5 == MD5_MAP[name], md5
136
- return path
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AIxPha/QSign/Dockerfile DELETED
@@ -1,15 +0,0 @@
1
- #程序开源地址 https://github.com/fuqiuluo/unidbg-fetch-qsign
2
-
3
- FROM openjdk:11.0-jdk
4
-
5
- ENV TZ Asia/Shanghai
6
-
7
- WORKDIR /app
8
-
9
- COPY unidbg-fetch-qsign /app
10
-
11
- CMD bash bin/unidbg-fetch-qsign --host=0.0.0.0 --port=7860 --count=5 --library=txlib --android_id=
12
-
13
- EXPOSE 7860
14
-
15
- #抱脸推荐项目 https://github.com/CikeyQi/QQsign_docs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Abdllh/Arabic_Poems_Generator/app.py DELETED
@@ -1,49 +0,0 @@
1
- import tensorflow as tf
2
- from tensorflow import keras
3
- import gradio as gr
4
-
5
- def generate_text(model,temperature, start_string):
6
- char2idx={'\t': 0, '\n': 1, ' ': 2, 'ء': 3, 'آ': 4, 'أ': 5, 'ؤ': 6, 'إ': 7, 'ئ': 8, 'ا': 9, 'ب': 10, 'ة': 11, 'ت': 12, 'ث': 13, 'ج': 14, 'ح': 15, 'خ': 16, 'د': 17, 'ذ': 18, 'ر': 19, 'ز': 20, 'س': 21, 'ش': 22, 'ص': 23, 'ض': 24, 'ط': 25, 'ظ': 26, 'ع': 27, 'غ': 28, 'ف': 29, 'ق': 30, 'ك': 31, 'ل': 32, 'م': 33, 'ن': 34, 'ه': 35, 'و': 36, 'ى': 37, 'ي': 38}
7
- idx2char=['\t', '\n', ' ', 'ء', 'آ', 'أ', 'ؤ', 'إ', 'ئ', 'ا', 'ب', 'ة', 'ت',
8
- 'ث', 'ج', 'ح', 'خ', 'د', 'ذ', 'ر', 'ز', 'س', 'ش', 'ص', 'ض', 'ط',
9
- 'ظ', 'ع', 'غ', 'ف', 'ق', 'ك', 'ل', 'م', 'ن', 'ه', 'و', 'ى', 'ي']
10
- # Evaluation step (generating text using the learned model)
11
-
12
- # Number of characters to generate
13
- num_generate = 1000
14
-
15
- # Converting our start string to numbers (vectorizing)
16
- input_eval = [char2idx[s] for s in start_string]
17
- input_eval = tf.expand_dims(input_eval, 0)
18
-
19
- # Empty string to store our results
20
- text_generated = []
21
-
22
- # Low temperatures results in more predictable text.
23
- # Higher temperatures results in more surprising text.
24
- # Experiment to find the best setting.
25
-
26
- # Here batch size == 1
27
- model.reset_states()
28
- for i in range(num_generate):
29
- predictions = model(input_eval)
30
- # remove the batch dimension
31
- predictions = tf.squeeze(predictions, 0)
32
-
33
- # using a random.categorical distribution to predict the word returned by the model
34
- predictions = predictions / temperature
35
- predicted_id = tf.random.categorical(predictions, num_samples=1)[-1,0].numpy()
36
-
37
- input_eval = tf.expand_dims([predicted_id], 0)
38
-
39
- text_generated.append(idx2char[predicted_id])
40
-
41
- return (start_string + ''.join(text_generated))
42
-
43
- reconstructed_model = keras.models.load_model("poems_generation_GRU (1).h5")
44
-
45
- def generate_poem(start,temperature):
46
- return generate_text(reconstructed_model,temperature, start_string=u""+start )
47
-
48
- iface = gr.Interface(fn=generate_poem, inputs=["text",gr.Slider(0, 1, value=1)], outputs="text")
49
- iface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AchyuthGamer/OpenGPT/g4f/Provider/Providers/ChatForAi.py DELETED
@@ -1,53 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from ..typing import AsyncGenerator
4
- from ..requests import StreamSession
5
- from .base_provider import AsyncGeneratorProvider
6
-
7
-
8
- class ChatForAi(AsyncGeneratorProvider):
9
- url = "https://chatforai.com"
10
- supports_gpt_35_turbo = True
11
- working = True
12
-
13
- @classmethod
14
- async def create_async_generator(
15
- cls,
16
- model: str,
17
- messages: list[dict[str, str]],
18
- timeout: int = 30,
19
- **kwargs
20
- ) -> AsyncGenerator:
21
- async with StreamSession(impersonate="chrome107", timeout=timeout) as session:
22
- prompt = messages[-1]["content"]
23
- data = {
24
- "conversationId": "temp",
25
- "conversationType": "chat_continuous",
26
- "botId": "chat_continuous",
27
- "globalSettings":{
28
- "baseUrl": "https://api.openai.com",
29
- "model": model if model else "gpt-3.5-turbo",
30
- "messageHistorySize": 5,
31
- "temperature": 0.7,
32
- "top_p": 1,
33
- **kwargs
34
- },
35
- "botSettings": {},
36
- "prompt": prompt,
37
- "messages": messages,
38
- }
39
- async with session.post(f"{cls.url}/api/handle/provider-openai", json=data) as response:
40
- response.raise_for_status()
41
- async for chunk in response.iter_content():
42
- yield chunk.decode()
43
-
44
- @classmethod
45
- @property
46
- def params(cls):
47
- params = [
48
- ("model", "str"),
49
- ("messages", "list[dict[str, str]]"),
50
- ("stream", "bool"),
51
- ]
52
- param = ", ".join([": ".join(p) for p in params])
53
- return f"g4f.provider.{cls.__name__} supports: ({param})"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AchyuthGamer/OpenGPT/g4f/Provider/Providers/DeepAi.py DELETED
@@ -1,77 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import json
4
- import js2py
5
- import random
6
- import hashlib
7
- from aiohttp import ClientSession
8
-
9
- from ..typing import AsyncGenerator
10
- from .base_provider import AsyncGeneratorProvider
11
-
12
-
13
- class DeepAi(AsyncGeneratorProvider):
14
- url: str = "https://deepai.org"
15
- working = True
16
- supports_gpt_35_turbo = True
17
-
18
- @staticmethod
19
- async def create_async_generator(
20
- model: str,
21
- messages: list[dict[str, str]],
22
- proxy: str = None,
23
- **kwargs
24
- ) -> AsyncGenerator:
25
-
26
- token_js = """
27
- var agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36'
28
- var a, b, c, d, e, h, f, l, g, k, m, n, r, x, C, E, N, F, T, O, P, w, D, G, Q, R, W, I, aa, fa, na, oa, ha, ba, X, ia, ja, ka, J, la, K, L, ca, S, U, M, ma, B, da, V, Y;
29
- h = Math.round(1E11 * Math.random()) + "";
30
- f = function () {
31
- for (var p = [], q = 0; 64 > q;) p[q] = 0 | 4294967296 * Math.sin(++q % Math.PI);
32
-
33
- return function (t) {
34
- var v, y, H, ea = [v = 1732584193, y = 4023233417, ~v, ~y],
35
- Z = [],
36
- A = unescape(encodeURI(t)) + "\u0080",
37
- z = A.length;
38
- t = --z / 4 + 2 | 15;
39
- for (Z[--t] = 8 * z; ~z;) Z[z >> 2] |= A.charCodeAt(z) << 8 * z--;
40
- for (q = A = 0; q < t; q += 16) {
41
- for (z = ea; 64 > A; z = [H = z[3], v + ((H = z[0] + [v & y | ~v & H, H & v | ~H & y, v ^ y ^ H, y ^ (v | ~H)][z = A >> 4] + p[A] + ~~Z[q | [A, 5 * A + 1, 3 * A + 5, 7 * A][z] & 15]) << (z = [7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21][4 * z + A++ % 4]) | H >>> -z), v, y]) v = z[1] | 0, y = z[2];
42
- for (A = 4; A;) ea[--A] += z[A]
43
- }
44
- for (t = ""; 32 > A;) t += (ea[A >> 3] >> 4 * (1 ^ A++) & 15).toString(16);
45
- return t.split("").reverse().join("")
46
- }
47
- }();
48
-
49
- "tryit-" + h + "-" + f(agent + f(agent + f(agent + h + "x")));
50
- """
51
-
52
- payload = {"chat_style": "chat", "chatHistory": json.dumps(messages)}
53
- api_key = js2py.eval_js(token_js)
54
- headers = {
55
- "api-key": api_key,
56
- "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",
57
- **kwargs.get("headers", {})
58
- }
59
- async with ClientSession(
60
- headers=headers
61
- ) as session:
62
- fill = "ing_is"
63
- fill = f"ack{fill}_a_crim"
64
- async with session.post(f"https://api.deepai.org/h{fill}e", proxy=proxy, data=payload) as response:
65
- response.raise_for_status()
66
- async for stream in response.content.iter_any():
67
- if stream:
68
- yield stream.decode()
69
-
70
-
71
- def get_api_key(user_agent: str):
72
- e = str(round(1E11 * random.random()))
73
-
74
- def hash(data: str):
75
- return hashlib.md5(data.encode()).hexdigest()[::-1]
76
-
77
- return f"tryit-{e}-" + hash(user_agent + hash(user_agent + hash(user_agent + e + "x")))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Amrrs/DragGan-Inversion/PTI/models/StyleCLIP/mapper/__init__.py DELETED
File without changes
spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/docs/source/en/api/configuration.md DELETED
@@ -1,30 +0,0 @@
1
- <!--Copyright 2023 The HuggingFace Team. All rights reserved.
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
4
- the License. You may obtain a copy of the License at
5
-
6
- http://www.apache.org/licenses/LICENSE-2.0
7
-
8
- Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
9
- an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
- specific language governing permissions and limitations under the License.
11
- -->
12
-
13
- # Configuration
14
-
15
- Schedulers from [`~schedulers.scheduling_utils.SchedulerMixin`] and models from [`ModelMixin`] inherit from [`ConfigMixin`] which stores all the parameters that are passed to their respective `__init__` methods in a JSON-configuration file.
16
-
17
- <Tip>
18
-
19
- To use private or [gated](https://huggingface.co/docs/hub/models-gated#gated-models) models, log-in with `huggingface-cli login`.
20
-
21
- </Tip>
22
-
23
- ## ConfigMixin
24
-
25
- [[autodoc]] ConfigMixin
26
- - load_config
27
- - from_config
28
- - save_config
29
- - to_json_file
30
- - to_json_string
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/tests/pipelines/deepfloyd_if/test_if_img2img.py DELETED
@@ -1,90 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2023 HuggingFace Inc.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
- import random
17
- import unittest
18
-
19
- import torch
20
-
21
- from diffusers import IFImg2ImgPipeline
22
- from diffusers.utils import floats_tensor
23
- from diffusers.utils.import_utils import is_xformers_available
24
- from diffusers.utils.testing_utils import skip_mps, torch_device
25
-
26
- from ..pipeline_params import (
27
- TEXT_GUIDED_IMAGE_VARIATION_BATCH_PARAMS,
28
- TEXT_GUIDED_IMAGE_VARIATION_PARAMS,
29
- )
30
- from ..test_pipelines_common import PipelineTesterMixin
31
- from . import IFPipelineTesterMixin
32
-
33
-
34
- @skip_mps
35
- class IFImg2ImgPipelineFastTests(PipelineTesterMixin, IFPipelineTesterMixin, unittest.TestCase):
36
- pipeline_class = IFImg2ImgPipeline
37
- params = TEXT_GUIDED_IMAGE_VARIATION_PARAMS - {"width", "height"}
38
- batch_params = TEXT_GUIDED_IMAGE_VARIATION_BATCH_PARAMS
39
- required_optional_params = PipelineTesterMixin.required_optional_params - {"latents"}
40
-
41
- def get_dummy_components(self):
42
- return self._get_dummy_components()
43
-
44
- def get_dummy_inputs(self, device, seed=0):
45
- if str(device).startswith("mps"):
46
- generator = torch.manual_seed(seed)
47
- else:
48
- generator = torch.Generator(device=device).manual_seed(seed)
49
-
50
- image = floats_tensor((1, 3, 32, 32), rng=random.Random(seed)).to(device)
51
-
52
- inputs = {
53
- "prompt": "A painting of a squirrel eating a burger",
54
- "image": image,
55
- "generator": generator,
56
- "num_inference_steps": 2,
57
- "output_type": "numpy",
58
- }
59
-
60
- return inputs
61
-
62
- def test_save_load_optional_components(self):
63
- self._test_save_load_optional_components()
64
-
65
- @unittest.skipIf(
66
- torch_device != "cuda" or not is_xformers_available(),
67
- reason="XFormers attention is only available with CUDA and `xformers` installed",
68
- )
69
- def test_xformers_attention_forwardGenerator_pass(self):
70
- self._test_xformers_attention_forwardGenerator_pass(expected_max_diff=1e-3)
71
-
72
- @unittest.skipIf(torch_device != "cuda", reason="float16 requires CUDA")
73
- def test_save_load_float16(self):
74
- # Due to non-determinism in save load of the hf-internal-testing/tiny-random-t5 text encoder
75
- super().test_save_load_float16(expected_max_diff=1e-1)
76
-
77
- @unittest.skipIf(torch_device != "cuda", reason="float16 requires CUDA")
78
- def test_float16_inference(self):
79
- super().test_float16_inference(expected_max_diff=1e-1)
80
-
81
- def test_attention_slicing_forward_pass(self):
82
- self._test_attention_slicing_forward_pass(expected_max_diff=1e-2)
83
-
84
- def test_save_load_local(self):
85
- self._test_save_load_local()
86
-
87
- def test_inference_batch_single_identical(self):
88
- self._test_inference_batch_single_identical(
89
- expected_max_diff=1e-2,
90
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Andy1621/uniformer_image_detection/configs/hrnet/faster_rcnn_hrnetv2p_w40_1x_coco.py DELETED
@@ -1,10 +0,0 @@
1
- _base_ = './faster_rcnn_hrnetv2p_w32_1x_coco.py'
2
- model = dict(
3
- pretrained='open-mmlab://msra/hrnetv2_w40',
4
- backbone=dict(
5
- type='HRNet',
6
- extra=dict(
7
- stage2=dict(num_channels=(40, 80)),
8
- stage3=dict(num_channels=(40, 80, 160)),
9
- stage4=dict(num_channels=(40, 80, 160, 320)))),
10
- neck=dict(type='HRFPN', in_channels=[40, 80, 160, 320], out_channels=256))
 
 
 
 
 
 
 
 
 
 
 
spaces/Andy1621/uniformer_image_detection/mmdet/apis/__init__.py DELETED
@@ -1,10 +0,0 @@
1
- from .inference import (async_inference_detector, inference_detector,
2
- init_detector, show_result_pyplot)
3
- from .test import multi_gpu_test, single_gpu_test
4
- from .train import get_root_logger, set_random_seed, train_detector
5
-
6
- __all__ = [
7
- 'get_root_logger', 'set_random_seed', 'train_detector', 'init_detector',
8
- 'async_inference_detector', 'inference_detector', 'show_result_pyplot',
9
- 'multi_gpu_test', 'single_gpu_test'
10
- ]
 
 
 
 
 
 
 
 
 
 
 
spaces/AnishKumbhar/ChatBot/text-generation-webui-main/docs/DeepSpeed.md DELETED
@@ -1,24 +0,0 @@
1
- An alternative way of reducing the GPU memory usage of models is to use the `DeepSpeed ZeRO-3` optimization.
2
-
3
- With this, I have been able to load a 6b model (GPT-J 6B) with less than 6GB of VRAM. The speed of text generation is very decent and much better than what would be accomplished with `--auto-devices --gpu-memory 6`.
4
-
5
- As far as I know, DeepSpeed is only available for Linux at the moment.
6
-
7
- ### How to use it
8
-
9
- 1. Install DeepSpeed:
10
-
11
- ```
12
- conda install -c conda-forge mpi4py mpich
13
- pip install -U deepspeed
14
- ```
15
-
16
- 2. Start the web UI replacing `python` with `deepspeed --num_gpus=1` and adding the `--deepspeed` flag. Example:
17
-
18
- ```
19
- deepspeed --num_gpus=1 server.py --deepspeed --chat --model gpt-j-6B
20
- ```
21
-
22
- ### Learn more
23
-
24
- For more information, check out [this comment](https://github.com/oobabooga/text-generation-webui/issues/40#issuecomment-1412038622) by 81300, who came up with the DeepSpeed support in this web UI.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Anonymous-sub/Rerender/ControlNet/annotator/uniformer/mmcv/runner/builder.py DELETED
@@ -1,24 +0,0 @@
1
- # Copyright (c) OpenMMLab. All rights reserved.
2
- import copy
3
-
4
- from ..utils import Registry
5
-
6
- RUNNERS = Registry('runner')
7
- RUNNER_BUILDERS = Registry('runner builder')
8
-
9
-
10
- def build_runner_constructor(cfg):
11
- return RUNNER_BUILDERS.build(cfg)
12
-
13
-
14
- def build_runner(cfg, default_args=None):
15
- runner_cfg = copy.deepcopy(cfg)
16
- constructor_type = runner_cfg.pop('constructor',
17
- 'DefaultRunnerConstructor')
18
- runner_constructor = build_runner_constructor(
19
- dict(
20
- type=constructor_type,
21
- runner_cfg=runner_cfg,
22
- default_args=default_args))
23
- runner = runner_constructor()
24
- return runner
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Anthony7906/MengHuiMXD_GPT/custom.css DELETED
@@ -1,162 +0,0 @@
1
- :root {
2
- --chatbot-color-light: #F3F3F3;
3
- --chatbot-color-dark: #121111;
4
- }
5
-
6
- /* status_display */
7
- #status_display {
8
- display: flex;
9
- min-height: 2.5em;
10
- align-items: flex-end;
11
- justify-content: flex-end;
12
- }
13
- #status_display p {
14
- font-size: .85em;
15
- font-family: monospace;
16
- color: var(--body-text-color-subdued);
17
- }
18
-
19
- #chuanhu_chatbot, #status_display {
20
- transition: all 0.6s;
21
- }
22
- /* list */
23
- ol:not(.options), ul:not(.options) {
24
- padding-inline-start: 2em !important;
25
- }
26
-
27
- /* 亮色 */
28
- #chuanhu_chatbot {
29
- background-color: var(--chatbot-color-light) !important;
30
- }
31
- [data-testid = "bot"] {
32
- background-color: #FFFFFF !important;
33
- }
34
- [data-testid = "user"] {
35
- background-color: #95EC69 !important;
36
- }
37
- /* 对话气泡 */
38
- [class *= "message"] {
39
- border-radius: var(--radius-xl) !important;
40
- border: none;
41
- padding: var(--spacing-xl) !important;
42
- font-size: var(--text-md) !important;
43
- line-height: var(--line-md) !important;
44
- min-height: calc(var(--text-md)*var(--line-md) + 2*var(--spacing-xl));
45
- min-width: calc(var(--text-md)*var(--line-md) + 2*var(--spacing-xl));
46
- }
47
- [data-testid = "bot"] {
48
- max-width: 85%;
49
- border-bottom-left-radius: 0 !important;
50
- }
51
- [data-testid = "user"] {
52
- max-width: 85%;
53
- width: auto !important;
54
- border-bottom-right-radius: 0 !important;
55
- }
56
- /* 表格 */
57
- table {
58
- margin: 1em 0;
59
- border-collapse: collapse;
60
- empty-cells: show;
61
- }
62
- td,th {
63
- border: 1.2px solid var(--border-color-primary) !important;
64
- padding: 0.2em;
65
- }
66
- thead {
67
- background-color: rgba(175,184,193,0.2);
68
- }
69
- thead th {
70
- padding: .5em .2em;
71
- }
72
- /* 行内代码 */
73
- code {
74
- display: inline;
75
- white-space: break-spaces;
76
- border-radius: 6px;
77
- margin: 0 2px 0 2px;
78
- padding: .2em .4em .1em .4em;
79
- background-color: rgba(175,184,193,0.2);
80
- }
81
- /* 代码块 */
82
- pre code {
83
- display: block;
84
- overflow: auto;
85
- white-space: pre;
86
- background-color: hsla(0, 0%, 0%, 80%)!important;
87
- border-radius: 10px;
88
- padding: 1.4em 1.2em 0em 1.4em;
89
- margin: 1.2em 2em 1.2em 0.5em;
90
- color: #FFF;
91
- box-shadow: 6px 6px 16px hsla(0, 0%, 0%, 0.2);
92
- }
93
- /* 代码高亮样式 */
94
- .highlight .hll { background-color: #49483e }
95
- .highlight .c { color: #75715e } /* Comment */
96
- .highlight .err { color: #960050; background-color: #1e0010 } /* Error */
97
- .highlight .k { color: #66d9ef } /* Keyword */
98
- .highlight .l { color: #ae81ff } /* Literal */
99
- .highlight .n { color: #f8f8f2 } /* Name */
100
- .highlight .o { color: #f92672 } /* Operator */
101
- .highlight .p { color: #f8f8f2 } /* Punctuation */
102
- .highlight .ch { color: #75715e } /* Comment.Hashbang */
103
- .highlight .cm { color: #75715e } /* Comment.Multiline */
104
- .highlight .cp { color: #75715e } /* Comment.Preproc */
105
- .highlight .cpf { color: #75715e } /* Comment.PreprocFile */
106
- .highlight .c1 { color: #75715e } /* Comment.Single */
107
- .highlight .cs { color: #75715e } /* Comment.Special */
108
- .highlight .gd { color: #f92672 } /* Generic.Deleted */
109
- .highlight .ge { font-style: italic } /* Generic.Emph */
110
- .highlight .gi { color: #a6e22e } /* Generic.Inserted */
111
- .highlight .gs { font-weight: bold } /* Generic.Strong */
112
- .highlight .gu { color: #75715e } /* Generic.Subheading */
113
- .highlight .kc { color: #66d9ef } /* Keyword.Constant */
114
- .highlight .kd { color: #66d9ef } /* Keyword.Declaration */
115
- .highlight .kn { color: #f92672 } /* Keyword.Namespace */
116
- .highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
117
- .highlight .kr { color: #66d9ef } /* Keyword.Reserved */
118
- .highlight .kt { color: #66d9ef } /* Keyword.Type */
119
- .highlight .ld { color: #e6db74 } /* Literal.Date */
120
- .highlight .m { color: #ae81ff } /* Literal.Number */
121
- .highlight .s { color: #e6db74 } /* Literal.String */
122
- .highlight .na { color: #a6e22e } /* Name.Attribute */
123
- .highlight .nb { color: #f8f8f2 } /* Name.Builtin */
124
- .highlight .nc { color: #a6e22e } /* Name.Class */
125
- .highlight .no { color: #66d9ef } /* Name.Constant */
126
- .highlight .nd { color: #a6e22e } /* Name.Decorator */
127
- .highlight .ni { color: #f8f8f2 } /* Name.Entity */
128
- .highlight .ne { color: #a6e22e } /* Name.Exception */
129
- .highlight .nf { color: #a6e22e } /* Name.Function */
130
- .highlight .nl { color: #f8f8f2 } /* Name.Label */
131
- .highlight .nn { color: #f8f8f2 } /* Name.Namespace */
132
- .highlight .nx { color: #a6e22e } /* Name.Other */
133
- .highlight .py { color: #f8f8f2 } /* Name.Property */
134
- .highlight .nt { color: #f92672 } /* Name.Tag */
135
- .highlight .nv { color: #f8f8f2 } /* Name.Variable */
136
- .highlight .ow { color: #f92672 } /* Operator.Word */
137
- .highlight .w { color: #f8f8f2 } /* Text.Whitespace */
138
- .highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
139
- .highlight .mf { color: #ae81ff } /* Literal.Number.Float */
140
- .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
141
- .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
142
- .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
143
- .highlight .sa { color: #e6db74 } /* Literal.String.Affix */
144
- .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
145
- .highlight .sc { color: #e6db74 } /* Literal.String.Char */
146
- .highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
147
- .highlight .sd { color: #e6db74 } /* Literal.String.Doc */
148
- .highlight .s2 { color: #e6db74 } /* Literal.String.Double */
149
- .highlight .se { color: #ae81ff } /* Literal.String.Escape */
150
- .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
151
- .highlight .si { color: #e6db74 } /* Literal.String.Interpol */
152
- .highlight .sx { color: #e6db74 } /* Literal.String.Other */
153
- .highlight .sr { color: #e6db74 } /* Literal.String.Regex */
154
- .highlight .s1 { color: #e6db74 } /* Literal.String.Single */
155
- .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
156
- .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
157
- .highlight .fm { color: #a6e22e } /* Name.Function.Magic */
158
- .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
159
- .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
160
- .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
161
- .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
162
- .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Arulkumar03/GroundingDINO_SOTA_Zero_Shot_Model/groundingdino/datasets/transforms.py DELETED
@@ -1,311 +0,0 @@
1
- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
2
- """
3
- Transforms and data augmentation for both image + bbox.
4
- """
5
- import os
6
- import random
7
-
8
- import PIL
9
- import torch
10
- import torchvision.transforms as T
11
- import torchvision.transforms.functional as F
12
-
13
- from groundingdino.util.box_ops import box_xyxy_to_cxcywh
14
- from groundingdino.util.misc import interpolate
15
-
16
-
17
- def crop(image, target, region):
18
- cropped_image = F.crop(image, *region)
19
-
20
- target = target.copy()
21
- i, j, h, w = region
22
-
23
- # should we do something wrt the original size?
24
- target["size"] = torch.tensor([h, w])
25
-
26
- fields = ["labels", "area", "iscrowd", "positive_map"]
27
-
28
- if "boxes" in target:
29
- boxes = target["boxes"]
30
- max_size = torch.as_tensor([w, h], dtype=torch.float32)
31
- cropped_boxes = boxes - torch.as_tensor([j, i, j, i])
32
- cropped_boxes = torch.min(cropped_boxes.reshape(-1, 2, 2), max_size)
33
- cropped_boxes = cropped_boxes.clamp(min=0)
34
- area = (cropped_boxes[:, 1, :] - cropped_boxes[:, 0, :]).prod(dim=1)
35
- target["boxes"] = cropped_boxes.reshape(-1, 4)
36
- target["area"] = area
37
- fields.append("boxes")
38
-
39
- if "masks" in target:
40
- # FIXME should we update the area here if there are no boxes?
41
- target["masks"] = target["masks"][:, i : i + h, j : j + w]
42
- fields.append("masks")
43
-
44
- # remove elements for which the boxes or masks that have zero area
45
- if "boxes" in target or "masks" in target:
46
- # favor boxes selection when defining which elements to keep
47
- # this is compatible with previous implementation
48
- if "boxes" in target:
49
- cropped_boxes = target["boxes"].reshape(-1, 2, 2)
50
- keep = torch.all(cropped_boxes[:, 1, :] > cropped_boxes[:, 0, :], dim=1)
51
- else:
52
- keep = target["masks"].flatten(1).any(1)
53
-
54
- for field in fields:
55
- if field in target:
56
- target[field] = target[field][keep]
57
-
58
- if os.environ.get("IPDB_SHILONG_DEBUG", None) == "INFO":
59
- # for debug and visualization only.
60
- if "strings_positive" in target:
61
- target["strings_positive"] = [
62
- _i for _i, _j in zip(target["strings_positive"], keep) if _j
63
- ]
64
-
65
- return cropped_image, target
66
-
67
-
68
- def hflip(image, target):
69
- flipped_image = F.hflip(image)
70
-
71
- w, h = image.size
72
-
73
- target = target.copy()
74
- if "boxes" in target:
75
- boxes = target["boxes"]
76
- boxes = boxes[:, [2, 1, 0, 3]] * torch.as_tensor([-1, 1, -1, 1]) + torch.as_tensor(
77
- [w, 0, w, 0]
78
- )
79
- target["boxes"] = boxes
80
-
81
- if "masks" in target:
82
- target["masks"] = target["masks"].flip(-1)
83
-
84
- return flipped_image, target
85
-
86
-
87
- def resize(image, target, size, max_size=None):
88
- # size can be min_size (scalar) or (w, h) tuple
89
-
90
- def get_size_with_aspect_ratio(image_size, size, max_size=None):
91
- w, h = image_size
92
- if max_size is not None:
93
- min_original_size = float(min((w, h)))
94
- max_original_size = float(max((w, h)))
95
- if max_original_size / min_original_size * size > max_size:
96
- size = int(round(max_size * min_original_size / max_original_size))
97
-
98
- if (w <= h and w == size) or (h <= w and h == size):
99
- return (h, w)
100
-
101
- if w < h:
102
- ow = size
103
- oh = int(size * h / w)
104
- else:
105
- oh = size
106
- ow = int(size * w / h)
107
-
108
- return (oh, ow)
109
-
110
- def get_size(image_size, size, max_size=None):
111
- if isinstance(size, (list, tuple)):
112
- return size[::-1]
113
- else:
114
- return get_size_with_aspect_ratio(image_size, size, max_size)
115
-
116
- size = get_size(image.size, size, max_size)
117
- rescaled_image = F.resize(image, size)
118
-
119
- if target is None:
120
- return rescaled_image, None
121
-
122
- ratios = tuple(float(s) / float(s_orig) for s, s_orig in zip(rescaled_image.size, image.size))
123
- ratio_width, ratio_height = ratios
124
-
125
- target = target.copy()
126
- if "boxes" in target:
127
- boxes = target["boxes"]
128
- scaled_boxes = boxes * torch.as_tensor(
129
- [ratio_width, ratio_height, ratio_width, ratio_height]
130
- )
131
- target["boxes"] = scaled_boxes
132
-
133
- if "area" in target:
134
- area = target["area"]
135
- scaled_area = area * (ratio_width * ratio_height)
136
- target["area"] = scaled_area
137
-
138
- h, w = size
139
- target["size"] = torch.tensor([h, w])
140
-
141
- if "masks" in target:
142
- target["masks"] = (
143
- interpolate(target["masks"][:, None].float(), size, mode="nearest")[:, 0] > 0.5
144
- )
145
-
146
- return rescaled_image, target
147
-
148
-
149
- def pad(image, target, padding):
150
- # assumes that we only pad on the bottom right corners
151
- padded_image = F.pad(image, (0, 0, padding[0], padding[1]))
152
- if target is None:
153
- return padded_image, None
154
- target = target.copy()
155
- # should we do something wrt the original size?
156
- target["size"] = torch.tensor(padded_image.size[::-1])
157
- if "masks" in target:
158
- target["masks"] = torch.nn.functional.pad(target["masks"], (0, padding[0], 0, padding[1]))
159
- return padded_image, target
160
-
161
-
162
- class ResizeDebug(object):
163
- def __init__(self, size):
164
- self.size = size
165
-
166
- def __call__(self, img, target):
167
- return resize(img, target, self.size)
168
-
169
-
170
- class RandomCrop(object):
171
- def __init__(self, size):
172
- self.size = size
173
-
174
- def __call__(self, img, target):
175
- region = T.RandomCrop.get_params(img, self.size)
176
- return crop(img, target, region)
177
-
178
-
179
- class RandomSizeCrop(object):
180
- def __init__(self, min_size: int, max_size: int, respect_boxes: bool = False):
181
- # respect_boxes: True to keep all boxes
182
- # False to tolerence box filter
183
- self.min_size = min_size
184
- self.max_size = max_size
185
- self.respect_boxes = respect_boxes
186
-
187
- def __call__(self, img: PIL.Image.Image, target: dict):
188
- init_boxes = len(target["boxes"])
189
- max_patience = 10
190
- for i in range(max_patience):
191
- w = random.randint(self.min_size, min(img.width, self.max_size))
192
- h = random.randint(self.min_size, min(img.height, self.max_size))
193
- region = T.RandomCrop.get_params(img, [h, w])
194
- result_img, result_target = crop(img, target, region)
195
- if (
196
- not self.respect_boxes
197
- or len(result_target["boxes"]) == init_boxes
198
- or i == max_patience - 1
199
- ):
200
- return result_img, result_target
201
- return result_img, result_target
202
-
203
-
204
- class CenterCrop(object):
205
- def __init__(self, size):
206
- self.size = size
207
-
208
- def __call__(self, img, target):
209
- image_width, image_height = img.size
210
- crop_height, crop_width = self.size
211
- crop_top = int(round((image_height - crop_height) / 2.0))
212
- crop_left = int(round((image_width - crop_width) / 2.0))
213
- return crop(img, target, (crop_top, crop_left, crop_height, crop_width))
214
-
215
-
216
- class RandomHorizontalFlip(object):
217
- def __init__(self, p=0.5):
218
- self.p = p
219
-
220
- def __call__(self, img, target):
221
- if random.random() < self.p:
222
- return hflip(img, target)
223
- return img, target
224
-
225
-
226
- class RandomResize(object):
227
- def __init__(self, sizes, max_size=None):
228
- assert isinstance(sizes, (list, tuple))
229
- self.sizes = sizes
230
- self.max_size = max_size
231
-
232
- def __call__(self, img, target=None):
233
- size = random.choice(self.sizes)
234
- return resize(img, target, size, self.max_size)
235
-
236
-
237
- class RandomPad(object):
238
- def __init__(self, max_pad):
239
- self.max_pad = max_pad
240
-
241
- def __call__(self, img, target):
242
- pad_x = random.randint(0, self.max_pad)
243
- pad_y = random.randint(0, self.max_pad)
244
- return pad(img, target, (pad_x, pad_y))
245
-
246
-
247
- class RandomSelect(object):
248
- """
249
- Randomly selects between transforms1 and transforms2,
250
- with probability p for transforms1 and (1 - p) for transforms2
251
- """
252
-
253
- def __init__(self, transforms1, transforms2, p=0.5):
254
- self.transforms1 = transforms1
255
- self.transforms2 = transforms2
256
- self.p = p
257
-
258
- def __call__(self, img, target):
259
- if random.random() < self.p:
260
- return self.transforms1(img, target)
261
- return self.transforms2(img, target)
262
-
263
-
264
- class ToTensor(object):
265
- def __call__(self, img, target):
266
- return F.to_tensor(img), target
267
-
268
-
269
- class RandomErasing(object):
270
- def __init__(self, *args, **kwargs):
271
- self.eraser = T.RandomErasing(*args, **kwargs)
272
-
273
- def __call__(self, img, target):
274
- return self.eraser(img), target
275
-
276
-
277
- class Normalize(object):
278
- def __init__(self, mean, std):
279
- self.mean = mean
280
- self.std = std
281
-
282
- def __call__(self, image, target=None):
283
- image = F.normalize(image, mean=self.mean, std=self.std)
284
- if target is None:
285
- return image, None
286
- target = target.copy()
287
- h, w = image.shape[-2:]
288
- if "boxes" in target:
289
- boxes = target["boxes"]
290
- boxes = box_xyxy_to_cxcywh(boxes)
291
- boxes = boxes / torch.tensor([w, h, w, h], dtype=torch.float32)
292
- target["boxes"] = boxes
293
- return image, target
294
-
295
-
296
- class Compose(object):
297
- def __init__(self, transforms):
298
- self.transforms = transforms
299
-
300
- def __call__(self, image, target):
301
- for t in self.transforms:
302
- image, target = t(image, target)
303
- return image, target
304
-
305
- def __repr__(self):
306
- format_string = self.__class__.__name__ + "("
307
- for t in self.transforms:
308
- format_string += "\n"
309
- format_string += " {0}".format(t)
310
- format_string += "\n)"
311
- return format_string
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Ashrafb/translate/README.md DELETED
@@ -1,14 +0,0 @@
1
- ---
2
- title: translate
3
- emoji: 🌍
4
- colorFrom: blue
5
- colorTo: green
6
- sdk: gradio
7
- sdk_version: 3.16.2
8
- app_file: app.py
9
- pinned: false
10
- license: mit
11
- duplicated_from: NooneImportant/translate
12
- ---
13
-
14
- # [$hyoo_lingua](https://lingua.hyoo.ru/)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_internal/wheel_builder.py DELETED
@@ -1,355 +0,0 @@
1
- """Orchestrator for building wheels from InstallRequirements.
2
- """
3
-
4
- import logging
5
- import os.path
6
- import re
7
- import shutil
8
- from typing import Iterable, List, Optional, Tuple
9
-
10
- from pip._vendor.packaging.utils import canonicalize_name, canonicalize_version
11
- from pip._vendor.packaging.version import InvalidVersion, Version
12
-
13
- from pip._internal.cache import WheelCache
14
- from pip._internal.exceptions import InvalidWheelFilename, UnsupportedWheel
15
- from pip._internal.metadata import FilesystemWheel, get_wheel_distribution
16
- from pip._internal.models.link import Link
17
- from pip._internal.models.wheel import Wheel
18
- from pip._internal.operations.build.wheel import build_wheel_pep517
19
- from pip._internal.operations.build.wheel_editable import build_wheel_editable
20
- from pip._internal.operations.build.wheel_legacy import build_wheel_legacy
21
- from pip._internal.req.req_install import InstallRequirement
22
- from pip._internal.utils.logging import indent_log
23
- from pip._internal.utils.misc import ensure_dir, hash_file
24
- from pip._internal.utils.setuptools_build import make_setuptools_clean_args
25
- from pip._internal.utils.subprocess import call_subprocess
26
- from pip._internal.utils.temp_dir import TempDirectory
27
- from pip._internal.utils.urls import path_to_url
28
- from pip._internal.vcs import vcs
29
-
30
- logger = logging.getLogger(__name__)
31
-
32
- _egg_info_re = re.compile(r"([a-z0-9_.]+)-([a-z0-9_.!+-]+)", re.IGNORECASE)
33
-
34
- BuildResult = Tuple[List[InstallRequirement], List[InstallRequirement]]
35
-
36
-
37
- def _contains_egg_info(s: str) -> bool:
38
- """Determine whether the string looks like an egg_info.
39
-
40
- :param s: The string to parse. E.g. foo-2.1
41
- """
42
- return bool(_egg_info_re.search(s))
43
-
44
-
45
- def _should_build(
46
- req: InstallRequirement,
47
- need_wheel: bool,
48
- ) -> bool:
49
- """Return whether an InstallRequirement should be built into a wheel."""
50
- if req.constraint:
51
- # never build requirements that are merely constraints
52
- return False
53
- if req.is_wheel:
54
- if need_wheel:
55
- logger.info(
56
- "Skipping %s, due to already being wheel.",
57
- req.name,
58
- )
59
- return False
60
-
61
- if need_wheel:
62
- # i.e. pip wheel, not pip install
63
- return True
64
-
65
- # From this point, this concerns the pip install command only
66
- # (need_wheel=False).
67
-
68
- if not req.source_dir:
69
- return False
70
-
71
- if req.editable:
72
- # we only build PEP 660 editable requirements
73
- return req.supports_pyproject_editable()
74
-
75
- return True
76
-
77
-
78
- def should_build_for_wheel_command(
79
- req: InstallRequirement,
80
- ) -> bool:
81
- return _should_build(req, need_wheel=True)
82
-
83
-
84
- def should_build_for_install_command(
85
- req: InstallRequirement,
86
- ) -> bool:
87
- return _should_build(req, need_wheel=False)
88
-
89
-
90
- def _should_cache(
91
- req: InstallRequirement,
92
- ) -> Optional[bool]:
93
- """
94
- Return whether a built InstallRequirement can be stored in the persistent
95
- wheel cache, assuming the wheel cache is available, and _should_build()
96
- has determined a wheel needs to be built.
97
- """
98
- if req.editable or not req.source_dir:
99
- # never cache editable requirements
100
- return False
101
-
102
- if req.link and req.link.is_vcs:
103
- # VCS checkout. Do not cache
104
- # unless it points to an immutable commit hash.
105
- assert not req.editable
106
- assert req.source_dir
107
- vcs_backend = vcs.get_backend_for_scheme(req.link.scheme)
108
- assert vcs_backend
109
- if vcs_backend.is_immutable_rev_checkout(req.link.url, req.source_dir):
110
- return True
111
- return False
112
-
113
- assert req.link
114
- base, ext = req.link.splitext()
115
- if _contains_egg_info(base):
116
- return True
117
-
118
- # Otherwise, do not cache.
119
- return False
120
-
121
-
122
- def _get_cache_dir(
123
- req: InstallRequirement,
124
- wheel_cache: WheelCache,
125
- ) -> str:
126
- """Return the persistent or temporary cache directory where the built
127
- wheel need to be stored.
128
- """
129
- cache_available = bool(wheel_cache.cache_dir)
130
- assert req.link
131
- if cache_available and _should_cache(req):
132
- cache_dir = wheel_cache.get_path_for_link(req.link)
133
- else:
134
- cache_dir = wheel_cache.get_ephem_path_for_link(req.link)
135
- return cache_dir
136
-
137
-
138
- def _verify_one(req: InstallRequirement, wheel_path: str) -> None:
139
- canonical_name = canonicalize_name(req.name or "")
140
- w = Wheel(os.path.basename(wheel_path))
141
- if canonicalize_name(w.name) != canonical_name:
142
- raise InvalidWheelFilename(
143
- "Wheel has unexpected file name: expected {!r}, "
144
- "got {!r}".format(canonical_name, w.name),
145
- )
146
- dist = get_wheel_distribution(FilesystemWheel(wheel_path), canonical_name)
147
- dist_verstr = str(dist.version)
148
- if canonicalize_version(dist_verstr) != canonicalize_version(w.version):
149
- raise InvalidWheelFilename(
150
- "Wheel has unexpected file name: expected {!r}, "
151
- "got {!r}".format(dist_verstr, w.version),
152
- )
153
- metadata_version_value = dist.metadata_version
154
- if metadata_version_value is None:
155
- raise UnsupportedWheel("Missing Metadata-Version")
156
- try:
157
- metadata_version = Version(metadata_version_value)
158
- except InvalidVersion:
159
- msg = f"Invalid Metadata-Version: {metadata_version_value}"
160
- raise UnsupportedWheel(msg)
161
- if metadata_version >= Version("1.2") and not isinstance(dist.version, Version):
162
- raise UnsupportedWheel(
163
- "Metadata 1.2 mandates PEP 440 version, "
164
- "but {!r} is not".format(dist_verstr)
165
- )
166
-
167
-
168
- def _build_one(
169
- req: InstallRequirement,
170
- output_dir: str,
171
- verify: bool,
172
- build_options: List[str],
173
- global_options: List[str],
174
- editable: bool,
175
- ) -> Optional[str]:
176
- """Build one wheel.
177
-
178
- :return: The filename of the built wheel, or None if the build failed.
179
- """
180
- artifact = "editable" if editable else "wheel"
181
- try:
182
- ensure_dir(output_dir)
183
- except OSError as e:
184
- logger.warning(
185
- "Building %s for %s failed: %s",
186
- artifact,
187
- req.name,
188
- e,
189
- )
190
- return None
191
-
192
- # Install build deps into temporary directory (PEP 518)
193
- with req.build_env:
194
- wheel_path = _build_one_inside_env(
195
- req, output_dir, build_options, global_options, editable
196
- )
197
- if wheel_path and verify:
198
- try:
199
- _verify_one(req, wheel_path)
200
- except (InvalidWheelFilename, UnsupportedWheel) as e:
201
- logger.warning("Built %s for %s is invalid: %s", artifact, req.name, e)
202
- return None
203
- return wheel_path
204
-
205
-
206
- def _build_one_inside_env(
207
- req: InstallRequirement,
208
- output_dir: str,
209
- build_options: List[str],
210
- global_options: List[str],
211
- editable: bool,
212
- ) -> Optional[str]:
213
- with TempDirectory(kind="wheel") as temp_dir:
214
- assert req.name
215
- if req.use_pep517:
216
- assert req.metadata_directory
217
- assert req.pep517_backend
218
- if global_options:
219
- logger.warning(
220
- "Ignoring --global-option when building %s using PEP 517", req.name
221
- )
222
- if build_options:
223
- logger.warning(
224
- "Ignoring --build-option when building %s using PEP 517", req.name
225
- )
226
- if editable:
227
- wheel_path = build_wheel_editable(
228
- name=req.name,
229
- backend=req.pep517_backend,
230
- metadata_directory=req.metadata_directory,
231
- tempd=temp_dir.path,
232
- )
233
- else:
234
- wheel_path = build_wheel_pep517(
235
- name=req.name,
236
- backend=req.pep517_backend,
237
- metadata_directory=req.metadata_directory,
238
- tempd=temp_dir.path,
239
- )
240
- else:
241
- wheel_path = build_wheel_legacy(
242
- name=req.name,
243
- setup_py_path=req.setup_py_path,
244
- source_dir=req.unpacked_source_directory,
245
- global_options=global_options,
246
- build_options=build_options,
247
- tempd=temp_dir.path,
248
- )
249
-
250
- if wheel_path is not None:
251
- wheel_name = os.path.basename(wheel_path)
252
- dest_path = os.path.join(output_dir, wheel_name)
253
- try:
254
- wheel_hash, length = hash_file(wheel_path)
255
- shutil.move(wheel_path, dest_path)
256
- logger.info(
257
- "Created wheel for %s: filename=%s size=%d sha256=%s",
258
- req.name,
259
- wheel_name,
260
- length,
261
- wheel_hash.hexdigest(),
262
- )
263
- logger.info("Stored in directory: %s", output_dir)
264
- return dest_path
265
- except Exception as e:
266
- logger.warning(
267
- "Building wheel for %s failed: %s",
268
- req.name,
269
- e,
270
- )
271
- # Ignore return, we can't do anything else useful.
272
- if not req.use_pep517:
273
- _clean_one_legacy(req, global_options)
274
- return None
275
-
276
-
277
- def _clean_one_legacy(req: InstallRequirement, global_options: List[str]) -> bool:
278
- clean_args = make_setuptools_clean_args(
279
- req.setup_py_path,
280
- global_options=global_options,
281
- )
282
-
283
- logger.info("Running setup.py clean for %s", req.name)
284
- try:
285
- call_subprocess(
286
- clean_args, command_desc="python setup.py clean", cwd=req.source_dir
287
- )
288
- return True
289
- except Exception:
290
- logger.error("Failed cleaning build dir for %s", req.name)
291
- return False
292
-
293
-
294
- def build(
295
- requirements: Iterable[InstallRequirement],
296
- wheel_cache: WheelCache,
297
- verify: bool,
298
- build_options: List[str],
299
- global_options: List[str],
300
- ) -> BuildResult:
301
- """Build wheels.
302
-
303
- :return: The list of InstallRequirement that succeeded to build and
304
- the list of InstallRequirement that failed to build.
305
- """
306
- if not requirements:
307
- return [], []
308
-
309
- # Build the wheels.
310
- logger.info(
311
- "Building wheels for collected packages: %s",
312
- ", ".join(req.name for req in requirements), # type: ignore
313
- )
314
-
315
- with indent_log():
316
- build_successes, build_failures = [], []
317
- for req in requirements:
318
- assert req.name
319
- cache_dir = _get_cache_dir(req, wheel_cache)
320
- wheel_file = _build_one(
321
- req,
322
- cache_dir,
323
- verify,
324
- build_options,
325
- global_options,
326
- req.editable and req.permit_editable_wheels,
327
- )
328
- if wheel_file:
329
- # Record the download origin in the cache
330
- if req.download_info is not None:
331
- # download_info is guaranteed to be set because when we build an
332
- # InstallRequirement it has been through the preparer before, but
333
- # let's be cautious.
334
- wheel_cache.record_download_origin(cache_dir, req.download_info)
335
- # Update the link for this.
336
- req.link = Link(path_to_url(wheel_file))
337
- req.local_file_path = req.link.file_path
338
- assert req.link.is_wheel
339
- build_successes.append(req)
340
- else:
341
- build_failures.append(req)
342
-
343
- # notify success/failure
344
- if build_successes:
345
- logger.info(
346
- "Successfully built %s",
347
- " ".join([req.name for req in build_successes]), # type: ignore
348
- )
349
- if build_failures:
350
- logger.info(
351
- "Failed to build %s",
352
- " ".join([req.name for req in build_failures]), # type: ignore
353
- )
354
- # Return a list of requirements that failed to build
355
- return build_successes, build_failures
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/__init__.py DELETED
@@ -1,23 +0,0 @@
1
- """Wrappers to call pyproject.toml-based build backend hooks.
2
- """
3
-
4
- from ._impl import (
5
- BackendInvalid,
6
- BackendUnavailable,
7
- BuildBackendHookCaller,
8
- HookMissing,
9
- UnsupportedOperation,
10
- default_subprocess_runner,
11
- quiet_subprocess_runner,
12
- )
13
-
14
- __version__ = '1.0.0'
15
- __all__ = [
16
- 'BackendUnavailable',
17
- 'BackendInvalid',
18
- 'HookMissing',
19
- 'UnsupportedOperation',
20
- 'default_subprocess_runner',
21
- 'quiet_subprocess_runner',
22
- 'BuildBackendHookCaller',
23
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pkg_resources/_vendor/importlib_resources/readers.py DELETED
@@ -1,122 +0,0 @@
1
- import collections
2
- import pathlib
3
- import operator
4
-
5
- from . import abc
6
-
7
- from ._itertools import unique_everseen
8
- from ._compat import ZipPath
9
-
10
-
11
- def remove_duplicates(items):
12
- return iter(collections.OrderedDict.fromkeys(items))
13
-
14
-
15
- class FileReader(abc.TraversableResources):
16
- def __init__(self, loader):
17
- self.path = pathlib.Path(loader.path).parent
18
-
19
- def resource_path(self, resource):
20
- """
21
- Return the file system path to prevent
22
- `resources.path()` from creating a temporary
23
- copy.
24
- """
25
- return str(self.path.joinpath(resource))
26
-
27
- def files(self):
28
- return self.path
29
-
30
-
31
- class ZipReader(abc.TraversableResources):
32
- def __init__(self, loader, module):
33
- _, _, name = module.rpartition('.')
34
- self.prefix = loader.prefix.replace('\\', '/') + name + '/'
35
- self.archive = loader.archive
36
-
37
- def open_resource(self, resource):
38
- try:
39
- return super().open_resource(resource)
40
- except KeyError as exc:
41
- raise FileNotFoundError(exc.args[0])
42
-
43
- def is_resource(self, path):
44
- # workaround for `zipfile.Path.is_file` returning true
45
- # for non-existent paths.
46
- target = self.files().joinpath(path)
47
- return target.is_file() and target.exists()
48
-
49
- def files(self):
50
- return ZipPath(self.archive, self.prefix)
51
-
52
-
53
- class MultiplexedPath(abc.Traversable):
54
- """
55
- Given a series of Traversable objects, implement a merged
56
- version of the interface across all objects. Useful for
57
- namespace packages which may be multihomed at a single
58
- name.
59
- """
60
-
61
- def __init__(self, *paths):
62
- self._paths = list(map(pathlib.Path, remove_duplicates(paths)))
63
- if not self._paths:
64
- message = 'MultiplexedPath must contain at least one path'
65
- raise FileNotFoundError(message)
66
- if not all(path.is_dir() for path in self._paths):
67
- raise NotADirectoryError('MultiplexedPath only supports directories')
68
-
69
- def iterdir(self):
70
- files = (file for path in self._paths for file in path.iterdir())
71
- return unique_everseen(files, key=operator.attrgetter('name'))
72
-
73
- def read_bytes(self):
74
- raise FileNotFoundError(f'{self} is not a file')
75
-
76
- def read_text(self, *args, **kwargs):
77
- raise FileNotFoundError(f'{self} is not a file')
78
-
79
- def is_dir(self):
80
- return True
81
-
82
- def is_file(self):
83
- return False
84
-
85
- def joinpath(self, child):
86
- # first try to find child in current paths
87
- for file in self.iterdir():
88
- if file.name == child:
89
- return file
90
- # if it does not exist, construct it with the first path
91
- return self._paths[0] / child
92
-
93
- __truediv__ = joinpath
94
-
95
- def open(self, *args, **kwargs):
96
- raise FileNotFoundError(f'{self} is not a file')
97
-
98
- @property
99
- def name(self):
100
- return self._paths[0].name
101
-
102
- def __repr__(self):
103
- paths = ', '.join(f"'{path}'" for path in self._paths)
104
- return f'MultiplexedPath({paths})'
105
-
106
-
107
- class NamespaceReader(abc.TraversableResources):
108
- def __init__(self, namespace_path):
109
- if 'NamespacePath' not in str(namespace_path):
110
- raise ValueError('Invalid path')
111
- self.path = MultiplexedPath(*list(namespace_path))
112
-
113
- def resource_path(self, resource):
114
- """
115
- Return the file system path to prevent
116
- `resources.path()` from creating a temporary
117
- copy.
118
- """
119
- return str(self.path.joinpath(resource))
120
-
121
- def files(self):
122
- return self.path
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_200ep_LSJ.py DELETED
@@ -1,14 +0,0 @@
1
- from .mask_rcnn_regnetx_4gf_dds_FPN_100ep_LSJ import (
2
- dataloader,
3
- lr_multiplier,
4
- model,
5
- optimizer,
6
- train,
7
- )
8
-
9
- train.max_iter *= 2 # 100ep -> 200ep
10
-
11
- lr_multiplier.scheduler.milestones = [
12
- milestone * 2 for milestone in lr_multiplier.scheduler.milestones
13
- ]
14
- lr_multiplier.scheduler.num_updates = train.max_iter
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/configs/quick_schedules/README.md DELETED
@@ -1,8 +0,0 @@
1
- These are quick configs for performance or accuracy regression tracking purposes.
2
-
3
- * `*instance_test.yaml`: can train on 2 GPUs. They are used to test whether the training can
4
- successfully finish. They are not expected to produce reasonable training results.
5
- * `*inference_acc_test.yaml`: They should be run using `--eval-only`. They run inference using pre-trained models and verify
6
- the results are as expected.
7
- * `*training_acc_test.yaml`: They should be trained on 8 GPUs. They finish in about an hour and verify the training accuracy
8
- is within the normal range.
 
 
 
 
 
 
 
 
 
spaces/BAAI/SegGPT/app.py DELETED
@@ -1,211 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- import sys
4
- import io
5
- import requests
6
- import json
7
- import base64
8
- from PIL import Image
9
- import numpy as np
10
- import gradio as gr
11
-
12
-
13
- def inference_mask1_sam(prompt,
14
- img,
15
- img_):
16
-
17
- files = {
18
- "useSam" : 1,
19
- "pimage" : resizeImg(prompt["image"]),
20
- "pmask" : resizeImg(prompt["mask"]),
21
- "img" : resizeImg(img),
22
- "img_" : resizeImg(img_)
23
- }
24
- r = requests.post("http://120.92.79.209/painter/run", json = files)
25
- a = json.loads(r.text)
26
-
27
- res = []
28
-
29
- for i in range(len(a)):
30
- #out = Image.open(io.BytesIO(base64.b64decode(a[i])))
31
- #out = out.resize((224, 224))
32
- #res.append(np.uint8(np.array(out)))
33
- res.append(np.uint8(np.array(Image.open(io.BytesIO(base64.b64decode(a[i]))))))
34
- return res[1:] # remove prompt image
35
-
36
- def inference_mask1(prompt,
37
- img,
38
- img_):
39
- files = {
40
- "pimage" : resizeImg(prompt["image"]),
41
- "pmask" : resizeImg(prompt["mask"]),
42
- "img" : resizeImg(img),
43
- "img_" : resizeImg(img_)
44
- }
45
- #r = requests.post("https://flagstudio.baai.ac.cn/painter/run", json = files)
46
- r = requests.post("http://120.92.79.209/painter/run", json = files)
47
- a = json.loads(r.text)
48
- res = []
49
- for i in range(len(a)):
50
- #out = Image.open(io.BytesIO(base64.b64decode(a[i])))
51
- #out = out.resize((224, 224))
52
- #res.append(np.uint8(np.array(out)))
53
- res.append(np.uint8(np.array(Image.open(io.BytesIO(base64.b64decode(a[i]))))))
54
- return res
55
-
56
-
57
-
58
- def inference_mask_video(
59
- prompt,
60
- vid,
61
- request: gr.Request,
62
- ):
63
-
64
-
65
- files = {
66
- "pimage" : resizeImgIo(prompt["image"]),
67
- "pmask" : resizeImgIo(prompt["mask"]),
68
- "video" : open(vid, 'rb'),
69
- }
70
- r = requests.post("http://120.92.79.209/painter/runVideo", files = files)
71
- '''
72
- path = str(uuid.uuid4()) + "." + str(time.time())
73
- fName = 'out.mp4'
74
- file_out = "video/" + path + "." + fName
75
- with open(file_out,"wb") as f:
76
- f.write(r.content)
77
- '''
78
- a = json.loads(r.text)
79
- return [np.uint8(np.array(Image.open(io.BytesIO(base64.b64decode(a["mask"]))))), a["url"]]
80
-
81
-
82
- def resizeImg(img):
83
- res, hres = 448, 448
84
- img = Image.fromarray(img).convert("RGB")
85
- img = img.resize((res, hres))
86
- temp = io.BytesIO()
87
- img.save(temp, format="WEBP")
88
- return base64.b64encode(temp.getvalue()).decode('ascii')
89
-
90
- def resizeImgIo(img):
91
- res, hres = 448, 448
92
- img = Image.fromarray(img).convert("RGB")
93
- img = img.resize((res, hres))
94
- temp = io.BytesIO()
95
- img.save(temp, format="WEBP")
96
- return io.BytesIO(temp.getvalue())
97
-
98
-
99
- # define app features and run
100
-
101
- examples = [
102
- ['./images/hmbb_1.jpg', './images/hmbb_2.jpg', './images/hmbb_3.jpg'],
103
- ['./images/rainbow_1.jpg', './images/rainbow_2.jpg', './images/rainbow_3.jpg'],
104
- ['./images/earth_1.jpg', './images/earth_2.jpg', './images/earth_3.jpg'],
105
- ['./images/obj_1.jpg', './images/obj_2.jpg', './images/obj_3.jpg'],
106
- ['./images/ydt_2.jpg', './images/ydt_1.jpg', './images/ydt_3.jpg'],
107
- ]
108
-
109
- examples_sam = [
110
- ['./images/nc_1.jpg', './images/nc_2.jpg', './images/nc_3.jpg'],
111
- ['./images/street_1.jpg', './images/street_2.jpg', './images/street_3.jpg'],
112
- ['./images/hmbb_1.jpg', './images/hmbb_2.jpg', './images/hmbb_3.jpg'],
113
- ['./images/earth_1.jpg', './images/earth_2.jpg', './images/earth_3.jpg'],
114
- ['./images/ydt_2.jpg', './images/ydt_1.jpg', './images/ydt_3.jpg'],
115
- ]
116
-
117
- examples_video = [
118
- ['./videos/horse-running.jpg', './videos/horse-running.mp4'],
119
- ['./videos/a_man_is_surfing_3_30.jpg', './videos/a_man_is_surfing_3_30.mp4'],
120
- ['./videos/a_car_is_moving_on_the_road_40.jpg', './videos/a_car_is_moving_on_the_road_40.mp4'],
121
- ['./videos/jeep-moving.jpg', './videos/jeep-moving.mp4'],
122
- ['./videos/child-riding_lego.jpg', './videos/child-riding_lego.mp4'],
123
- ]
124
-
125
-
126
-
127
- demo_mask = gr.Interface(fn=inference_mask1,
128
- inputs=[gr.ImageMask(brush_radius=8, label="prompt (提示图)"), gr.Image(label="img1 (测试图1)"), gr.Image(label="img2 (测试图2)")],
129
- #outputs=[gr.Image(shape=(448, 448), label="output1 (输出图1)"), gr.Image(shape=(448, 448), label="output2 (输出图2)")],
130
- outputs=[gr.Image(label="output1 (输出图1)").style(height=256, width=256), gr.Image(label="output2 (输出图2)").style(height=256, width=256)],
131
- #outputs=gr.Gallery(label="outputs (输出图)"),
132
- examples=examples,
133
- #title="SegGPT for Any Segmentation<br>(Painter Inside)",
134
- description="<p> \
135
- Choose an example below &#128293; &#128293; &#128293; <br>\
136
- Or, upload by yourself: <br>\
137
- 1. Upload images to be tested to 'img1' and/or 'img2'. <br>2. Upload a prompt image to 'prompt' and draw a mask. <br>\
138
- <br> \
139
- 💎 The more accurate you annotate, the more accurate the model predicts. <br>\
140
- 💎 Examples below were never trained and are randomly selected for testing in the wild. <br>\
141
- 💎 Current UI interface only unleashes a small part of the capabilities of SegGPT, i.e., 1-shot case. \
142
- </p>",
143
- cache_examples=False,
144
- allow_flagging="never",
145
- )
146
-
147
-
148
-
149
- demo_mask_sam = gr.Interface(fn=inference_mask1_sam,
150
- inputs=[gr.ImageMask(brush_radius=4, label="prompt (提示图)"), gr.Image(label="img1 (测试图1)"), gr.Image(label="img2 (测试图2)")],
151
- #outputs=[gr.Image(shape=(448, 448), label="output1 (输出图1)"), gr.Image(shape=(448, 448), label="output2 (输出图2)")],
152
- # outputs=[gr.Image(label="output1 (输出图1)").style(height=256, width=256), gr.Image(label="output2 (输出图2)").style(height=256, width=256)],
153
- #outputs=gr.Gallery(label="outputs (输出图)"),
154
- outputs=[gr.Image(label="SAM output (mask)").style(height=256, width=256),gr.Image(label="output1 (输出图1)").style(height=256, width=256), gr.Image(label="output2 (输出图2)").style(height=256, width=256)],
155
- # outputs=[gr.Image(label="output3 (输出图1)").style(height=256, width=256), gr.Image(label="output4 (输出图2)").style(height=256, width=256)],
156
- examples=examples_sam,
157
- #title="SegGPT for Any Segmentation<br>(Painter Inside)",
158
- description="<p> \
159
- <strong>SAM+SegGPT: One touch for segmentation in all images or videos.</strong> <br>\
160
- Choose an example below &#128293; &#128293; &#128293; <br>\
161
- Or, upload by yourself: <br>\
162
- 1. Upload images to be tested to 'img1' and 'img2'. <br>2. Upload a prompt image to 'prompt' and draw <strong>a point or line on the target</strong>. <br>\
163
- <br> \
164
- 💎 SAM segments the target with any point or scribble, then SegGPT segments all other images. <br>\
165
- 💎 Examples below were never trained and are randomly selected for testing in the wild. <br>\
166
- 💎 Current UI interface only unleashes a small part of the capabilities of SegGPT, i.e., 1-shot case. \
167
- </p>",
168
- cache_examples=False,
169
- allow_flagging="never",
170
- )
171
-
172
- demo_mask_video = gr.Interface(fn=inference_mask_video,
173
- inputs=[gr.ImageMask(label="prompt (提示图)"), gr.Video(label="video (测试视频)").style(height=448, width=448)],
174
- outputs=[gr.Image(label="SAM output (mask)").style(height=256, width=256), gr.Video().style(height=448, width=448)],
175
- examples=examples_video,
176
- description="<p> \
177
- <strong>SegGPT+SAM: One touch for any segmentation in a video.</strong> <br>\
178
- Choose an example below &#128293; &#128293; &#128293; <br>\
179
- Or, upload by yourself: <br>\
180
- 1. Upload a video to be tested to 'video'. If failed, please check the codec, we recommend h.264 by default. <br>2. Upload a prompt image to 'prompt' and draw <strong>a point or line on the target</strong>. <br>\
181
- <br> \
182
- 💎 SAM segments the target with any point or scribble, then SegGPT segments the whole video. <br>\
183
- 💎 Examples below were never trained and are randomly selected for testing in the wild. <br>\
184
- 💎 Current UI interface only unleashes a small part of the capabilities of SegGPT, i.e., 1-shot case. <br> \
185
- Note: we only take the first 16 frames for the demo. \
186
- </p>",
187
- cache_examples=False,
188
- allow_flagging="never",
189
- )
190
-
191
-
192
-
193
-
194
- title = "SegGPT: Segmenting Everything In Context<br> \
195
- <div align='center'> \
196
- <h2><a href='https://arxiv.org/abs/2304.03284' target='_blank' rel='noopener'>[paper]</a> \
197
- <a href='https://github.com/baaivision/Painter' target='_blank' rel='noopener'>[code]</a></h2> \
198
- <br> \
199
- <image src='file/rainbow2.gif' width='720px' /> \
200
- <h2>SegGPT performs arbitrary segmentation tasks in images or videos via in-context inference, such as object instance, stuff, part, contour, and text, with only one single model.</h2> \
201
- </div> \
202
- "
203
-
204
- demo = gr.TabbedInterface([demo_mask_sam, demo_mask_video, demo_mask], ['SAM+SegGPT (一触百通)', '🎬Anything in a Video', 'General 1-shot'], title=title)
205
-
206
- #demo.launch(share=True, auth=("baai", "vision"))
207
- demo.launch(enable_queue=False)
208
- #demo.launch(server_name="0.0.0.0", server_port=34311)
209
- # -
210
-
211
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Benson/text-generation/Examples/Asfalto 9 Leyendas Descargar Sin Tienda Microsoft.md DELETED
@@ -1,47 +0,0 @@
1
-
2
- <h1>Cómo descargar OBB ARK Survival Evolved</h1>
3
- <p>ARK Survival Evolved es uno de los juegos de supervivencia de acción y aventura más populares e inmersivos del mercado. Te permite explorar, crear, domesticar y luchar en un vasto mundo abierto lleno de dinosaurios y otras criaturas. Sin embargo, si quieres disfrutar de la experiencia completa de este juego en tu dispositivo Android, tendrás que descargar e instalar los archivos OBB junto con el archivo APK. En este artículo, explicaremos qué son los archivos OBB, por qué los necesita y cómo instalarlos en su dispositivo Android. </p>
4
- <h2>¿Qué es ARK Survival Evolved? </h2>
5
- <h3>Características y jugabilidad</h3>
6
- <p>ARK Survival Evolved es un juego que combina conceptos prehistóricos y modernos para que los jugadores puedan sobrevivir y explorar una tierra sin fin. Puedes elegir jugar solo o con otros jugadores en línea, y usar tu astucia para matar o domar a las criaturas primitivas que vagan por la tierra. También puedes construir refugios, crear objetos, cultivar cultivos, investigar tecnologías y personalizar tu personaje. El juego cuenta con un dinámico ciclo día-noche, sistema meteorológico y física realista. También puedes experimentar diferentes mapas y modos, como Ragnarok, Valguero, Genesis y más. </p>
7
- <h2>asfalto 9 leyendas descargar sin tienda microsoft</h2><br /><p><b><b>Download File</b> &#10026;&#10026;&#10026; <a href="https://bltlly.com/2v6Jal">https://bltlly.com/2v6Jal</a></b></p><br /><br />
8
- <h3>Descargar opciones y requisitos</h3>
9
- <p>ARK Survival Evolved está disponible para su descarga en varias plataformas, como PC, Xbox One, PlayStation 4, Nintendo Switch, iOS y Android. Sin embargo, el juego no es gratis y tendrás que comprarlo en la tienda oficial o en el sitio web de tu plataforma. Para dispositivos Android, puedes comprar el juego en Google Play Store por $19.99. El juego requiere Android 7.0 o superior, y al menos 2 GB de RAM y 2 GB de espacio de almacenamiento. También necesitará 2 GB adicionales de espacio de almacenamiento para los archivos OBB. </p>
10
- <h2>¿Qué son los archivos OBB y por qué los necesita? </h2>
11
- <h3>La diferencia entre archivos APK y OBB</h3>
12
-
13
- <h3>Los beneficios de los archivos OBB para ARK Survival Evolved</h3>
14
- <p>Como puedes imaginar, ARK Survival Evolved es un juego que tiene muchos datos que no se pueden comprimir en un solo archivo APK. El juego tiene gráficos de alta calidad, efectos de sonido, música, animaciones y más que mejoran la experiencia de juego. Por lo tanto, tendrá que descargar los archivos OBB junto con el archivo APK para disfrutar de todas las características del juego. Los archivos OBB también le permitirá actualizar el juego sin tener que descargar todo el archivo APK de nuevo. </p>
15
- <h2>Cómo instalar archivos OBB en dispositivos Android</h2>
16
- <h3>Paso 1: Permitir fuentes desconocidas</h3>
17
- <p>Antes de que pueda instalar cualquier archivo APK u OBB en su dispositivo Android, debe habilitar la opción para permitir fuentes desconocidas. Esta opción le permite instalar aplicaciones desde fuentes distintas de Google Play Store. Para hacer esto, vaya a Configuración > Seguridad > Fuentes desconocidas y conéctelo. También es posible que necesite conceder permiso a aplicaciones específicas que utiliza para descargar o instalar archivos APK u OBB. </p>
18
- <h3>Paso <h3>Paso 2: Descargue los archivos OBB de una fuente confiable</h3>
19
- <p>Una vez que haya habilitado la opción de fuentes desconocidas, puede proceder a descargar los archivos OBB para ARK Survival Evolved. Puede encontrar muchos sitios web que ofrecen los archivos OBB de forma gratuita, pero debe tener cuidado y elegir una fuente confiable y segura. Algunos sitios web pueden contener malware, virus o archivos falsos que pueden dañar su dispositivo o comprometer sus datos. Por lo tanto, le recomendamos que utilice un sitio web confiable y verificado, como [APKPure] o [APKMody]. Estos sitios web proporcionan los archivos OBB más recientes y originales para ARK Survival Evolved, así como otros juegos y aplicaciones populares. </p>
20
- <h3>Paso 3: Extraiga y copie la carpeta OBB a la ruta de destino</h3>
21
-
22
- <ul>
23
- <li>Abra la aplicación de administrador de archivos y busque los archivos OBB descargados. </li>
24
- <li>Seleccione los archivos OBB y toque en Extraer.</li>
25
- <li>Elija una carpeta de destino donde desea extraer los archivos. Puede crear una nueva carpeta o usar una existente. </li>
26
- <li>Espere a que termine el proceso de extracción. </li>
27
- <li>Después de la extracción, verá una carpeta llamada com.studiowildcard.wardrumstudios.ark. Esta es la carpeta OBB para ARK Survival Evolved.</li>
28
- <li>Copie esta carpeta y péguela a la siguiente ruta: Almacenamiento interno > Android > obb. Si no ve la carpeta obb, puede crear una. </li>
29
- </ul>
30
- <h3>Paso 4: Iniciar el juego y disfrutar de</h3>
31
- <p>Ahora que ha instalado los archivos OBB, puede iniciar el juego y disfrutarlo en su dispositivo Android. Para ello, simplemente toca el icono de ARK Survival Evolved en la pantalla de inicio o en el cajón de aplicaciones. El juego verificará los archivos OBB y cargará los datos. Es posible que necesites conceder algunos permisos al juego, como acceso al almacenamiento, acceso a la ubicación, etc. Una vez que el juego esté cargado, puedes comenzar a jugar y explorar el mundo de ARK Survival Evolved.</p>
32
- <h2>Conclusión</h2>
33
- <p>En este artículo, le hemos mostrado cómo descargar e instalar los archivos OBB para ARK Survival Evolved en su dispositivo Android. Siguiendo estos sencillos pasos, podrás disfrutar de todas las características y gráficos de este increíble juego. Esperamos que haya encontrado este artículo útil e informativo. Si tiene alguna pregunta o comentario, no dude en dejar un comentario a continuación. </p>
34
- <h2>Preguntas frecuentes</h2>
35
- <h4> ¿Cuál es el tamaño de los archivos OBB para ARK Survival Evolved? </h4>
36
- <p>El tamaño de los archivos OBB para ARK Survival Evolved puede variar dependiendo de la versión y actualización del juego. Sin embargo, a partir de junio de 2023, la última versión del juego (v2.0.25) tiene un tamaño de archivo OBB de aproximadamente 2 GB.</p>
37
- <h4>¿Puedo jugar ARK Survival Evolved sin conexión? </h4>
38
-
39
- <h4>¿Puedo transferir mi progreso de un dispositivo a otro? </h4>
40
- <p>Sí, puede transferir su progreso de un dispositivo a otro mediante el uso de su cuenta de Google Play. Para ello, debe iniciar sesión con su cuenta de Google Play en ambos dispositivos y habilitar el almacenamiento en la nube en la configuración del juego. Luego, puedes sincronizar tu progreso entre dispositivos. </p>
41
- <p></p>
42
- <h4>¿Cómo puedo actualizar ARK Survival Evolved? </h4>
43
- <p>Para actualizar ARK Survival Evolved, necesita descargar e instalar los últimos archivos APK y OBB de una fuente confiable. También puedes buscar actualizaciones desde la configuración del juego o desde la Google Play Store.</p>
44
- <h4>¿Cómo puedo obtener más recursos y objetos en ARK Survival Evolved? </h4>
45
- <p>Puede obtener más recursos y artículos en ARK Survival Evolved explorando, cosechando, elaborando, comerciando o comprándolos con dinero real. También puedes usar trucos o mods para obtener recursos y objetos ilimitados, pero esto puede afectar tu experiencia de juego o causar errores. </p> 64aa2da5cf<br />
46
- <br />
47
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Benson/text-generation/Examples/Descarga De La Aplicacin Xender 2019.md DELETED
@@ -1,181 +0,0 @@
1
- <br />
2
- <h1>SharePoint Download 2016: Cómo comenzar con la plataforma de colaboración de Microsoft</h1>
3
- <p>Si está buscando una manera de organizar, almacenar, compartir y acceder a la información en su organización, es posible que desee considerar SharePoint. SharePoint es una plataforma basada en la web que se integra con Microsoft Office y le permite crear sitios web, bibliotecas de documentos, listas, flujos de trabajo y más. En este artículo, explicaremos qué es SharePoint, por qué podría necesitarlo, cómo descargar SharePoint Server 2016 y cómo usarlo de manera efectiva. </p>
4
- <h2>¿Qué es SharePoint y por qué lo necesita? </h2>
5
- <p>SharePoint es un producto de software que le permite crear y administrar sitios web para diversos fines, como intranets, extranets, sitios de equipos, sitios de proyectos, sistemas de gestión de documentos, bases de conocimiento, etc. SharePoint también proporciona herramientas para la colaboración, comunicación, búsqueda, inteligencia empresarial, redes sociales y automatización del flujo de trabajo. Con SharePoint, puede:</p>
6
- <h2>descarga de la aplicación xender 2019</h2><br /><p><b><b>Download</b> &#10001; &#10001; &#10001; <a href="https://bltlly.com/2v6JwA">https://bltlly.com/2v6JwA</a></b></p><br /><br />
7
- <ul>
8
- <li>Almacenar y organizar documentos, archivos, imágenes, vídeos y otros tipos de contenido en ubicaciones centralizadas. </li>
9
- <li>Acceder y editar contenido desde cualquier dispositivo, en cualquier lugar, en cualquier momento. </li>
10
- <li>Compartir contenido con usuarios internos y externos, como colegas, clientes, socios, proveedores, etc.</li>
11
- <li>Trabajar juntos en documentos y proyectos en tiempo real o asíncronamente. </li>
12
- <li>Administrar permisos y configuraciones de seguridad para contenido y usuarios. </li>
13
- <li>Encuentra información rápida y fácilmente usando motores de búsqueda y filtros. </li>
14
- <li>Analizar datos y generar informes utilizando tablas, gráficos, paneles, etc.</li>
15
- <li>Automatice los procesos de negocio y los flujos de trabajo utilizando formularios, alertas, notificaciones, etc.</li>
16
- <li>Personaliza la apariencia de tus sitios web usando temas, plantillas, partes web, etc.</li>
17
- </ul>
18
- <h3>Características y beneficios de SharePoint</h3>
19
- <p>Algunas de las características y beneficios clave de SharePoint son:</p>
20
- <ul>
21
-
22
- <li><strong>Flexibilidad:</strong> SharePoint se puede personalizar y configurar para adaptarse a diferentes necesidades y preferencias. </li>
23
- <li><strong>Integración:</strong> SharePoint puede integrarse con otros productos de Microsoft, como Office 365, Outlook, OneDrive, Teams, Power BI, etc., así como aplicaciones y servicios de terceros. </li>
24
- <li><strong>Fiabilidad:</strong> SharePoint puede proporcionar alta disponibilidad y rendimiento con opciones de copia de seguridad y recuperación. </li>
25
- <li><strong>Seguridad:</strong> SharePoint puede proteger sus datos y usuarios con cifrado, autenticación, autorización, auditoría, etc.</li>
26
- </ul>
27
- <h3>ediciones y versiones de SharePoint</h3>
28
- <p>Hay dos ediciones principales de SharePoint: SharePoint Online y SharePoint Server. SharePoint Online es un servicio basado en la nube que forma parte de la suite de Office 365. Puede suscribirse a SharePoint Online como un servicio independiente o como parte de un paquete con otras aplicaciones de Office 365. SharePoint Online ofrece actualizaciones automáticas, mantenimiento y soporte de Microsoft. Sin embargo, también tiene algunas limitaciones en términos de personalización y control. </p>
29
- <p>SharePoint Server es una solución local que puede instalar en sus propios servidores o en un entorno alojado. Puede comprar SharePoint Server como un producto independiente o como parte de un paquete con otros productos de Microsoft. SharePoint Server ofrece más flexibilidad y control sobre su entorno. Sin embargo, también requiere más recursos y experiencia para instalar, configurar y mantener. <p>Además de las ediciones, también hay diferentes versiones de SharePoint. La última versión es SharePoint Server 2019, que se lanzó en octubre de 2018. Sin embargo, si no está listo para actualizar a la última versión, todavía puede usar las versiones anteriores, como SharePoint Server 2016, que se lanzó en marzo de 2016. SharePoint Server 2016 es el foco de este artículo, y le mostraremos cómo descargarlo y usarlo en las siguientes secciones. </p>
30
-
31
- <p>Si desea descargar SharePoint Server 2016, deberá seguir estos pasos:</p>
32
- <h3>Requisitos y requisitos previos del sistema</h3>
33
- <p>Antes de descargar SharePoint Server 2016, tendrá que asegurarse de que su sistema cumple con los requisitos mínimos y que ha instalado los requisitos previos necesarios. Los requisitos del sistema para SharePoint Server 2016 son:</p>
34
- <ul>
35
- <li><strong>Sistema operativo:</strong> Windows Server 2012 R2 o Windows Server 2016</li>
36
- <li><strong>Procesador:</strong> 64 bits, 4 núcleos mínimo</li>
37
- <li><strong>Memoria:</strong> 16 GB mínimo</li>
38
- <li><strong>Espacio en el disco duro:</strong> 80 GB mínimo</li>
39
- <li><strong>Servidor de base de datos:</strong> Microsoft SQL Server 2014 Service Pack 1 o Microsoft SQL Server 2016</li>
40
- </ul>
41
- <p>Los requisitos previos para SharePoint Server 2016 son:</p>
42
- <p></p>
43
- <ul>
44
- <li><strong>. NET Framework 4.5.2 o superior</strong></li>
45
- <li><strong>Marco de administración de Windows 4.0 o superior</strong></li>
46
- <li><strong>Fundación de identidad de Windows (WIF) 1.0</strong></li>
47
- <li><strong>Microsoft Sync Framework Tiempo de ejecución v1.0 SP1 (x64)</strong></li>
48
- <li><strong>Windows Server AppFabric 1.1</strong></li>
49
- <li><strong>Paquete de actualización acumulativo 7 para Microsoft AppFabric 1.1 para Windows Server (KB3092423)</strong></li>
50
- <li><strong>Cliente de servicios de calidad de datos (DQSInstaller.exe)</strong></li>
51
- <li><strong>Microsoft ODBC Driver 11 para SQL Server</strong></li>
52
- <li><strong>Servicios de datos de Microsoft WCF 5.6</strong></li>
53
- <li><strong>Microsoft Information Protection and Control Client (MSIPC)</strong></li>
54
- <li><strong>Cliente nativo de Microsoft SQL Server 2012 (SQLNCI.msi)</strong></li>
55
- <li><strong>Herramientas del cliente de minería de datos de Microsoft SQL Server 2012 (SQLSERVER2012_ASADOMD10.msi)</strong></li>
56
- <li><strong>Servicios de análisis de Microsoft SQL Server 2012 ADOMD.NET (SQLSERVER2012_ADOMD10.msi)</strong></li>
57
-
58
- </ul>
59
- <p>Puede descargar e instalar los prerrequisitos utilizando la herramienta Pre-requisito del instalador que viene con el medio de instalación de SharePoint Server. Alternativamente, puede descargarlos e instalarlos manualmente desde el Centro de descargas de Microsoft.</p>
60
- <h3>Descargar opciones y claves del producto</h3>
61
- <p>Para descargar SharePoint Server 2016, tiene dos opciones: puede descargar una versión de prueba o una versión con licencia. La versión de prueba es gratuita y válida durante 180 días. La versión con licencia requiere una compra y una clave de producto. </p>
62
- <p>Puede descargar la versión de prueba de SharePoint Server 2016 desde el Microsoft Evaluation Center. Deberá iniciar sesión con su cuenta de Microsoft y proporcionar información básica, como su nombre, dirección de correo electrónico, país, etc. También deberá elegir el idioma y el formato de archivo (ISO o IMG) de la descarga. El tamaño del archivo es de aproximadamente 3 GB.</p>
63
- <p>Puede descargar la versión con licencia de SharePoint Server 2016 desde el Microsoft Volume Licensing Service Center. Deberá iniciar sesión con su cuenta de trabajo y tener un acuerdo de licencia válido con Microsoft. También tendrá que introducir su clave de producto para activar el software. La clave del producto es un código de 25 caracteres que se ve así: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.</p>
64
- <h3>Pasos y consejos de instalación</h3>
65
- <p>Para instalar SharePoint Server 2016, deberá seguir estos pasos:</p>
66
- <ol>
67
- <li><strong>Grabar el archivo ISO o IMG en un DVD o montarlo como una unidad virtual. </strong></li>
68
- <li><strong>Ejecute el archivo setup.exe desde el medio de instalación. </strong></li>
69
- <li><strong>En la página Introduzca su clave de producto, ingrese su clave de producto si tiene una o déjela en blanco si está usando la versión de prueba. </strong></li>
70
- <li><strong>En la página Lea los términos de licencia de Microsoft Software, lea los términos y seleccione la casilla Acepto los términos de este acuerdo. </strong></li>
71
-
72
- <li><strong>En la pestaña Tipo de servidor, seleccione el tipo de servidor que desea instalar: Completo o Independiente. Complete significa que usará un servidor de base de datos independiente para SharePoint. Independiente significa que usará el servidor de base de datos incorporado en la misma máquina que SharePoint.</strong></li>
73
- <li><strong>En la pestaña Instalar requisitos previos de software, haga clic en Instalar requisitos previos para instalar los componentes necesarios para SharePoint Server 2016. Es posible que necesite reiniciar el equipo después de la instalación. </strong></li>
74
- <li><strong>En la pestaña Instalar servidor SharePoint, haga clic en Instalar servidor SharePoint para iniciar el proceso de instalación. Es posible que tenga que volver a introducir su clave de producto si está utilizando la versión de prueba. </strong></li>
75
- <li><strong>En la página Ejecutar asistente de configuración, seleccione la casilla Ejecutar el asistente de configuración de productos de SharePoint ahora y haga clic en Cerrar.</strong></li>
76
- <li><strong>En la página Productos de bienvenida a SharePoint, haga clic en Siguiente.</strong></li>
77
- <li><strong>En la página Conectar a una granja de servidores, seleccione si desea crear una nueva granja de servidores o unirse a una ya existente. Si está creando una nueva granja de servidores, deberá especificar el nombre del servidor de la base de datos, el nombre de la base de datos, la cuenta de acceso a la base de datos y la frase de contraseña. Si se une a una granja de servidores existente, necesitará especificar el nombre del servidor de base de datos, el nombre de la base de datos y la frase de contraseña. </strong></li>
78
- <li><strong>En la página Especificar rol de servidor, seleccione el rol de su servidor en la granja de servidores: Granja de un solo servidor, Interfaz web, Aplicación, Caché distribuida, Búsqueda, Personalizado o Carga especial. El rol determina los servicios y características que se habilitarán en el servidor. </strong></li>
79
- <li><strong>En la página Especificar configuración de la base de datos, introduzca el número de puerto y el proveedor de autenticación para su base de datos de configuración. Puede usar la configuración predeterminada o cambiarla según sus preferencias. </strong></li>
80
-
81
- <li><strong>En la página Configure SharePoint Central Administration Web Application, especifique si desea crear una nueva aplicación web para la Administración Central o usar una existente. Si está creando una nueva aplicación web, deberá especificar el número de puerto y el proveedor de autenticación para ella. También puede elegir si desea usar Secure Sockets Layer (SSL) para el cifrado. </strong></li>
82
- <li><strong>En la página Cómo completar el asistente de configuración de productos de SharePoint, revise sus ajustes y haga clic en Siguiente para aplicarlos. El proceso de configuración puede tardar varios minutos. </strong></li>
83
- <li><strong>En la página Configuración exitosa, haga clic en Finalizar para completar la instalación y configuración de SharePoint Server 2016. </strong></li>
84
- </ol>
85
- <p>Algunos consejos para instalar SharePoint Server 2016 son:</p>
86
- <ul>
87
- <li><strong>Asegúrese de que tiene suficiente espacio en disco y memoria para la instalación y operación de SharePoint Server 2016. </strong></li>
88
- <li><strong>Utilice una cuenta de dominio con privilegios de administrador local para la instalación y configuración de SharePoint Server 2016. </strong></li>
89
- <li><strong>Desactivar el software antivirus y la configuración del firewall que pueden interferir con la instalación y configuración de SharePoint Server 2016. </strong></li>
90
- <li><strong>Siga las mejores prácticas y recomendaciones de Microsoft para instalar y configurar SharePoint Server 2016. </strong></li>
91
- </ul>
92
- <h2>Cómo usar SharePoint Server 2016</h2>
93
- <p>Después de haber instalado y configurado SharePoint Server 2016, puede comenzar a usarlo para crear y administrar sitios web y contenido. Estas son algunas de las tareas básicas que puede realizar con SharePoint Server 2016:</p>
94
- <h3>Crear y gestionar sitios y subsitios</h3>
95
-
96
- <ol>
97
- <li><strong>Vaya al sitio donde desea crear un nuevo sitio o subsitio. </strong></li>
98
- <li><strong>Haga clic en Configuración > Contenido del sitio > Nuevo > Subsite.</strong></li>
99
- <li><strong>En la página Nuevo sitio SharePoint, ingrese un título, descripción, URL e idioma para su sitio o subsitio. </strong></li>
100
- <li><strong>Seleccione una plantilla para su sitio o subsitio de las opciones disponibles. Puedes elegir entre diferentes categorías, como Team Site, Project Site, Blog, Wiki, etc.</strong></li>
101
- <li><strong>Especifique los permisos para su sitio o subsitio. Puede optar por heredar los permisos del sitio padre o usar permisos únicos. También puede agregar o quitar usuarios y grupos y asignarles diferentes roles, como Propietarios, Miembros, Visitantes, etc.</strong></li>
102
- <li><strong>Especifique las opciones de navegación para su sitio o subsitio. Puede elegir mostrar el sitio o subsitio en la barra de enlaces superior y el inicio rápido del sitio padre o no. También puede cambiar el orden y la apariencia de los enlaces. </strong></li>
103
- <li><strong>Haga clic en Crear para crear su sitio o subsitio. </strong></li>
104
- </ol>
105
- <p>Para administrar un sitio o un subsitio, deberá seguir estos pasos:</p>
106
- <ol>
107
- <li><strong>Navegue hasta el sitio o subsitio que desea administrar. </strong></li>
108
- <li><strong>Haga clic en Configuración > Configuración del sitio.</strong></li>
109
- <li><strong>En la página Configuración del sitio, puede acceder a varias opciones para administrar su sitio o subsitio, como:</strong></li>
110
- <ul>
111
- <li><strong>Mira y siente:</strong> Puedes cambiar el título, la descripción, el logotipo, el tema, la página maestra, la navegación, etc. de tu sitio o subsitio. </li>
112
- <li><strong>Usuarios y Permisos:</strong> Puede administrar los usuarios y grupos que tienen acceso a su sitio o subsitio y sus roles y permisos. </li>
113
- <li><strong>Galerías de diseñadores web:</strong> Puede administrar las partes web, columnas de sitios, tipos de contenido, etc. que están disponibles para su sitio o subsitio. </li>
114
-
115
- <li><strong>Administración de colecciones de sitios:</strong> Puede administrar las funciones de recopilación de sitios, papelera de reciclaje, informes de registros de auditoría, etc. de su colección de sitios. </li>
116
- </ul>
117
- </ol>
118
- <h3>Trabajar con listas, bibliotecas y documentos</h3>
119
- <p>Una lista es una colección de datos que puede compartir con otros. Una biblioteca es un tipo de lista que almacena archivos, como documentos, imágenes, vídeos, etc. Puede crear listas y bibliotecas utilizando plantillas que proporcionan columnas y vistas predefinidas. También puede trabajar con listas y bibliotecas mediante acciones que le permiten agregar, editar, eliminar, ordenar, filtrar y buscar elementos en sus listas y bibliotecas. También puede administrar listas y bibliotecas usando configuraciones que controlan su apariencia, comportamiento y permisos. </p>
120
- <p>Para crear una lista o una biblioteca, deberá seguir estos pasos:</p>
121
- <ol>
122
- <li><strong>Vaya al sitio o al subsitio donde desea crear una nueva lista o biblioteca. </strong></li>
123
- <li><strong>Haga clic en Configuración > Contenido del sitio > Nuevo > Lista o Biblioteca.</strong></li>
124
- <li><strong>En la página Crear, seleccione una plantilla para su lista o biblioteca de las opciones disponibles. Puede elegir entre diferentes categorías, como Lista personalizada, Tareas, Calendario, Biblioteca de documentos, Biblioteca de imágenes, etc.</strong></li>
125
- <li><strong>Introduzca un nombre y una descripción para su lista o biblioteca y haga clic en Crear.</strong></li>
126
- </ol>
127
- <p>Para trabajar con una lista o una biblioteca, deberá seguir estos pasos:</p>
128
- <ol>
129
- <li><strong>Vaya a la lista o biblioteca con la que desea trabajar. </strong></li>
130
- <li><strong>En la página de lista o biblioteca, puede realizar varias acciones en los elementos de su lista o biblioteca, como:</strong></li>
131
- <ul>
132
- <li><strong>Agregar:</strong> Puede agregar nuevos elementos o archivos a su lista o biblioteca haciendo clic en Nuevo o Subir. También puede arrastrar y soltar archivos desde su computadora a su biblioteca. </li>
133
-
134
- <li><strong>Eliminar:</strong> Puede eliminar elementos o archivos de su lista o biblioteca seleccionándolos y haciendo clic en Eliminar. También puede moverlos a la papelera de reciclaje para su posterior recuperación. </li>
135
- <li><strong>Ordenar:</strong> Puede ordenar elementos o archivos en su lista o biblioteca haciendo clic en los encabezados de las columnas. También puede cambiar el orden de las columnas arrastrándolas y soltándolas. </li>
136
- <li><strong>Filtro:</strong> Puede filtrar elementos o archivos en su lista o biblioteca haciendo clic en el icono de filtro junto a los encabezados de las columnas. También puede usar filtros y vistas avanzadas para refinar sus resultados. </li>
137
- <li><strong>Buscar:</strong> Puede buscar artículos o archivos en su lista o biblioteca introduciendo palabras clave en el cuadro de búsqueda. También puede utilizar operadores de búsqueda y ámbitos para reducir su búsqueda. </li>
138
- </ul>
139
- </ol>
140
- <p>Para administrar una lista o una biblioteca, deberá seguir estos pasos:</p>
141
- <ol>
142
- <li><strong>Vaya a la lista o biblioteca que desea administrar. </strong></li>
143
- <li><strong>Haga clic en Configuración > Configuración de lista o Configuración de biblioteca.</strong></li>
144
- <li><strong>En la página Configuración, puede acceder a varias opciones para administrar su lista o biblioteca, como:</strong></li>
145
- <ul>
146
- <li><strong>Configuración general:</strong> Puede cambiar el nombre, la descripción, el control de versiones, la aprobación del contenido, etc. de su lista o biblioteca. </li>
147
- <li><strong>Columnas:</strong> Puede agregar, editar, eliminar, reordenar e indexar columnas en su lista o biblioteca. Las columnas son campos que almacenan información sobre sus elementos o archivos. </li>
148
- <li><strong>Vistas:</strong> Puede crear, editar, eliminar y administrar vistas en su lista o biblioteca. Las vistas son formas de mostrar y organizar tus elementos o archivos según ciertos criterios. </li>
149
- <li><strong>Permisos y administración:</strong> Puede administrar los permisos y la configuración de seguridad de su lista o biblioteca y sus elementos o archivos. También puede eliminar, guardar como plantilla, auditoría, etc. su lista o biblioteca. </li>
150
- </ul>
151
- </ol>
152
-
153
- <p>Uno de los principales beneficios de SharePoint es que le permite colaborar con otros usuarios en su contenido y proyectos. Puede compartir sus sitios, listas, bibliotecas y documentos con usuarios internos, como sus colegas, gerentes y empleados, o usuarios externos, como sus clientes, socios, proveedores, etc. También puede trabajar juntos en su contenido y proyectos en tiempo real o de forma asincrónica. Estas son algunas de las formas en que puede colaborar con otros usuarios usando SharePoint:</p>
154
- <ul>
155
- <li><strong>Compartir sitios, listas, bibliotecas y documentos:</strong> Puede compartir sus sitios, listas, bibliotecas y documentos con otros usuarios haciendo clic en Compartir en la esquina superior derecha de la página. A continuación, puede introducir los nombres o direcciones de correo electrónico de los usuarios con los que desea compartir y asignarles diferentes niveles de permisos, como Editar, Ver, Control completo, etc. También puede agregar un mensaje para explicar por qué comparte el contenido. También puede dejar de compartir el contenido en cualquier momento haciendo clic en Compartido con y eliminando a los usuarios de la lista. </li>
156
- <li><strong>Invitar a usuarios externos:</strong> Puede invitar a usuarios externos a acceder a sus sitios, listas, bibliotecas y documentos haciendo clic en Compartir e ingresando sus direcciones de correo electrónico. A continuación, puede elegir si desea exigirles que inicien sesión con una cuenta de Microsoft o una cuenta de trabajo o escuela, o permitirles acceder al contenido sin iniciar sesión. También puede elegir si desea enviarles una invitación por correo electrónico o copiar un enlace al contenido. También puede administrar los usuarios externos que tienen acceso a su contenido haciendo clic en Configuración del sitio > Permisos del sitio > Configuración de solicitud de acceso.</li>
157
-
158
- <li><strong>Usa el historial de versiones y echa un vistazo:</strong> Puedes usar el historial de versiones y las funciones para administrar los cambios y actualizaciones realizados en tus documentos por ti mismo o por otros usuarios. El historial de versiones le permite ver las versiones anteriores de un documento y restaurarlas si es necesario. La verificación le permite bloquear un documento para editarlo y evitar que otros hagan cambios hasta que lo vuelva a revisar. Para utilizar el historial de versiones, solo tiene que hacer clic en los puntos suspensivos (...) junto a un documento y seleccione Historial de versiones. Para utilizar check out, solo tiene que hacer clic en los puntos suspensivos (...) junto a un documento y seleccione Check Out.</li>
159
- </ul>
160
- <h3>Personalizar y configurar la configuración de SharePoint</h3>
161
- <p>Además de crear y administrar contenido y colaborar con otros usuarios, también puede personalizar y configurar la configuración de SharePoint para adaptarse a sus necesidades y preferencias. Puede cambiar la apariencia, el comportamiento y la funcionalidad de SharePoint utilizando varias opciones y herramientas. Estas son algunas de las cosas que puede personalizar y configurar en SharePoint:</p>
162
- <ul>
163
- <li><strong>Temas:</strong> Puede cambiar la combinación de colores y el estilo de fuente de sus sitios usando temas. Los temas son conjuntos predefinidos de colores y fuentes que puedes aplicar a tus sitios. Para cambiar el tema de tu sitio, solo tienes que hacer clic Configuración > Cambiar la apariencia > Tema y seleccionar un tema de las opciones disponibles. </li>
164
- <li><strong>Plantillas:</strong> Puede cambiar el diseño y las características de sus sitios utilizando plantillas. Las plantillas son conjuntos predefinidos de páginas web, listas, bibliotecas, partes web, etc. que puede aplicar a sus sitios. Para cambiar la plantilla de su sitio, solo tiene que hacer clic Configuración > Configuración del sitio > Acciones del sitio > Guardar sitio como plantilla y guardar su sitio como plantilla. Luego puede crear un nuevo sitio usando esa plantilla o aplicarla a un sitio existente. </li>
165
-
166
- <li><strong>Aplicaciones:</strong> Puede ampliar la funcionalidad y las características de SharePoint utilizando aplicaciones. Las aplicaciones son complementos que proporcionan funciones o servicios adicionales, como calendarios, encuestas, mapas, etc. Para agregar una aplicación a su sitio, solo tiene que hacer clic en Configuración > Contenido del sitio > Nuevo > Aplicación y seleccionar una aplicación de la SharePoint Store o el catálogo de aplicaciones de su organización. </li>
167
- <li><strong>Configuración del sitio:</strong> Puede cambiar la configuración que afecta a su sitio y su contenido utilizando la página Configuración del sitio. La página Configuración del sitio proporciona varias opciones para administrar su sitio, como título, descripción, logotipo, idioma, configuración regional, configuración de búsqueda, características del sitio, características de colección del sitio, etc. Para acceder a la página Configuración del sitio, solo tiene que hacer clic Configuración > Configuración del sitio.</li>
168
- </ul>
169
- <h2>Conclusión</h2>
170
- <p>SharePoint es una plataforma potente y versátil que puede ayudarlo a organizar, almacenar, compartir y acceder a la información en toda su organización. SharePoint Server 2016 es la última versión local de SharePoint que ofrece más flexibilidad y control sobre su entorno. En este artículo, hemos explicado qué es SharePoint, por qué podría necesitarlo, cómo descargar SharePoint Server 2016 y cómo usarlo de manera efectiva. Esperamos que este artículo le haya ayudado a comenzar con SharePoint y que disfrute usándolo para sus necesidades de contenido y colaboración. </p>
171
- <h2>Preguntas frecuentes</h2>
172
- <p>Aquí están algunas de las preguntas más frecuentes sobre SharePoint Server 2016:</p>
173
- <h4>Q: ¿Cuánto cuesta SharePoint Server 2016? </h4>
174
-
175
- <h4>Q: ¿Cómo puedo actualizar desde una versión anterior de SharePoint a SharePoint Server 2016? </h4>
176
- <p>A: El proceso de actualización de una versión anterior de SharePoint a SharePoint Server 2016 implica dos pasos: actualización de la base de datos y actualización de la colección del sitio. La actualización de adjuntos de base de datos significa que debe separar las bases de datos de contenido de su granja de SharePoint anterior y adjuntarlas a su nueva granja de SharePoint Server 2016. La actualización de la colección de sitios significa que actualiza las colecciones de sitios en sus bases de datos de contenido a la nueva versión de SharePoint. Puede realizar la actualización de adjuntos de base de datos utilizando los comandos de PowerShell o Administración central. Puede realizar la actualización de la colección de sitios utilizando los comandos de PowerShell o la página Actualización de la colección de sitios. </p>
177
- <h4>Q: ¿Cómo puedo hacer copias de seguridad y restaurar mis datos de SharePoint Server 2016? </h4>
178
-
179
- <p>A: Puede solucionar y resolver problemas en SharePoint Server 2016 usando varias herramientas y recursos, como: - Visor de eventos: Puede usar Visor de eventos para ver los eventos y errores que ocurren en su entorno de SharePoint Server 2016. También puede filtrar, ordenar, exportar y archivar los eventos y errores para un análisis posterior. - ULS Viewer: Puede usar ULS Viewer para ver los registros del Unified Logging Service (ULS) generados por SharePoint Server 2016. Los registros de ULS contienen información detallada sobre las operaciones y actividades que ocurren en su entorno de SharePoint Server 2016. También puede filtrar, buscar, resaltar y exportar los registros de ULS para un análisis adicional. - Health Analyzer: Puede utilizar Health Analyzer para supervisar el estado y el rendimiento de su entorno de SharePoint Server 2016. Health Analyzer ejecuta varias reglas que verifican posibles problemas o problemas en su entorno. También puede ver los resultados de las reglas y seguir las recomendaciones para solucionar los problemas o problemas. - Panel de control para desarrolladores: Puede usar el panel de control para desarrolladores para medir el rendimiento y el uso de recursos de sus páginas y componentes de SharePoint Server 2016. Developer Dashboard muestra varias métricas, como el tiempo de ejecución, consultas SQL, llamadas a servicios web, etc. También puede habilitar o deshabilitar Developer Dashboard para diferentes ámbitos y usuarios. - Microsoft Support: Puede utilizar Microsoft Support para acceder a varios recursos y servicios que pueden ayudarle a solucionar y resolver problemas en SharePoint Server 2016. Algunos ejemplos de recursos y servicios de Microsoft Support son artículos de la Base de Conocimiento, foros, blogs, vídeos, seminarios web, etc. <h4>P: ¿Cómo puedo obtener más información sobre SharePoint Server 2016? </h4> 64aa2da5cf<br />
180
- <br />
181
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/BetterAPI/BetterChat/src/lib/utils/analytics.ts DELETED
@@ -1,39 +0,0 @@
1
- export interface GAEvent {
2
- hitType: "event";
3
- eventCategory: string;
4
- eventAction: string;
5
- eventLabel?: string;
6
- eventValue?: number;
7
- }
8
-
9
- // Send a Google Analytics event
10
- export function sendAnalyticsEvent({
11
- eventCategory,
12
- eventAction,
13
- eventLabel,
14
- eventValue,
15
- }: Omit<GAEvent, "hitType">): void {
16
- // Mandatory fields
17
- const event: GAEvent = {
18
- hitType: "event",
19
- eventCategory,
20
- eventAction,
21
- };
22
- // Optional fields
23
- if (eventLabel) {
24
- event.eventLabel = eventLabel;
25
- }
26
- if (eventValue) {
27
- event.eventValue = eventValue;
28
- }
29
-
30
- // @ts-expect-error typescript doesn't know gtag is on the window object
31
- if (!!window?.gtag && typeof window?.gtag === "function") {
32
- // @ts-expect-error typescript doesn't know gtag is on the window object
33
- window?.gtag("event", eventAction, {
34
- event_category: event.eventCategory,
35
- event_label: event.eventLabel,
36
- value: event.eventValue,
37
- });
38
- }
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/BetterAPI/BetterChat_new/src/lib/utils/randomUuid.ts DELETED
@@ -1,14 +0,0 @@
1
- type UUID = ReturnType<typeof crypto.randomUUID>;
2
-
3
- export function randomUUID(): UUID {
4
- // Only on old safari / ios
5
- if (!("randomUUID" in crypto)) {
6
- return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) =>
7
- (
8
- Number(c) ^
9
- (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (Number(c) / 4)))
10
- ).toString(16)
11
- ) as UUID;
12
- }
13
- return crypto.randomUUID();
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/BilalSardar/Lyrics-Text_to_music/app.py DELETED
@@ -1,203 +0,0 @@
1
- import sys
2
- import os
3
- from pathlib import Path
4
- import json
5
- import secrets
6
- import copy
7
- import gradio as gr
8
- import TMIDI
9
- import urllib
10
- from fuzzywuzzy import fuzz
11
- from fuzzywuzzy import process
12
- from itertools import islice, accumulate
13
-
14
- from pprint import pprint
15
-
16
- import tqdm.auto
17
- from tqdm import auto
18
- from midi2audio import FluidSynth
19
- from IPython.display import display, Javascript, HTML, Audio
20
-
21
- # only for plotting pianoroll
22
- import pretty_midi
23
- import librosa.display
24
- import matplotlib.pyplot as plt
25
-
26
-
27
- import mido
28
- from midi2audio import FluidSynth
29
-
30
-
31
-
32
-
33
- #midtoaud=gr.Interface.load(name="spaces/kboaten/MIDI-Audio-Extension")
34
- print('Loading the Karaoke model. Please wait...')
35
- data = TMIDI.Tegridy_Any_Pickle_File_Loader('Karaoke-English-Full')
36
-
37
- print('Done!')
38
- print('Prepping data...')
39
-
40
- kar_ev_f = data[2]
41
-
42
- kar = []
43
- karaoke = []
44
-
45
- for k in auto.tqdm(kar_ev_f):
46
- k.sort(reverse=False, key=lambda x: x[1])
47
- for kk in k:
48
-
49
- if kk[0] == 'note' or kk[0] == 'text_event':
50
- kar.append(kk)
51
-
52
- kar_words = []
53
- for o in auto.tqdm(kar):
54
- if o[0] != 'note':
55
- kar_words.append(str(o[2]).lower())
56
-
57
- print('Done! Enjoy! :)')
58
-
59
- def TextToMusic(lyrics,notes,rand):
60
- text = list(lyrics.split("."))
61
- randomize_words_matching = rand
62
- song = []
63
-
64
- words_lst = ''
65
-
66
- print('=' * 100)
67
-
68
- print('Deep-Muse Text to Music Generator')
69
- print('Starting up...')
70
-
71
- print('=' * 100)
72
-
73
- for t in auto.tqdm(text):
74
- txt = t.lower().split(' ')
75
-
76
- kar_words_split = list(TMIDI.Tegridy_List_Slicer(kar_words, len(txt)))
77
-
78
- ratings = []
79
-
80
- for k in kar_words_split:
81
- ratings.append(fuzz.ratio(txt, k))
82
-
83
- if randomize_words_matching:
84
-
85
- try:
86
- ind = ratings.index(secrets.choice([max(ratings)-5, max(ratings)-4, max(ratings)-3, max(ratings)-2, max(ratings)-1, max(ratings)]))
87
- except:
88
- ind = ratings.index(max(ratings))
89
-
90
- else:
91
- ind = ratings.index(max(ratings))
92
-
93
- words_list = kar_words_split[ind]
94
- pos = ind * len(txt)
95
-
96
-
97
- print(words_list)
98
-
99
- words_lst += ' '.join(words_list) + chr(10)
100
-
101
- c = 0
102
- for i in range(len(kar)):
103
- if kar[i][0] != 'note':
104
- if c == pos:
105
- idx = i
106
- break
107
-
108
- if kar[i][0] != 'note':
109
- c += 1
110
-
111
- c = 0
112
- for i in range(idx, len(kar)):
113
- if kar[i][0] != 'note':
114
- if c == len(txt):
115
- break
116
-
117
- if kar[i][0] == 'note':
118
- song.append(kar[i])
119
-
120
- if kar[i][0] != 'note':
121
- c += 1
122
- song.append(kar[i])
123
-
124
- so = [y for y in song if len(y) > 3]
125
- if so != []: sigs = TMIDI.Tegridy_MIDI_Signature(so, so)
126
-
127
- print('=' * 100)
128
-
129
- print(sigs[0])
130
-
131
- print('=' * 100)
132
-
133
- song1 = []
134
- p = song[0]
135
- p[1] = 0
136
- time = 0
137
-
138
- song.sort(reverse=False, key=lambda x: x[1])
139
-
140
- for i in range(len(song)-1):
141
-
142
- ss = copy.deepcopy(song[i])
143
- if song[i][1] != p[1]:
144
-
145
- if abs(song[i][1] - p[1]) > 1000:
146
- time += 300
147
- else:
148
- time += abs(song[i][1] - p[1])
149
-
150
- ss[1] = time
151
- song1.append(ss)
152
-
153
- p = copy.deepcopy(song[i])
154
- else:
155
-
156
- ss[1] = time
157
- song1.append(ss)
158
-
159
- p = copy.deepcopy(song[i])
160
-
161
- pprint(words_lst, compact=True)
162
- print('=' * 100)
163
- TMIDI.Tegridy_SONG_to_MIDI_Converter(song1, output_file_name='deep-muse-Output-MIDI')
164
- fname = 'deep-muse-Output-MIDI'
165
-
166
- fn = os.path.basename(fname + '.mid')
167
- fn1 = fn.split('.')[0]
168
- print('Playing and plotting composition...')
169
-
170
- pm = pretty_midi.PrettyMIDI(fname + '.mid')
171
-
172
- # Retrieve piano roll of the MIDI file
173
- piano_roll = pm.get_piano_roll()
174
-
175
- plt.figure(figsize=(14, 5))
176
- librosa.display.specshow(piano_roll, x_axis='time', y_axis='cqt_note', fmin=1, hop_length=160, sr=16000, cmap=plt.cm.hot)
177
- plt.title('Composition: ' + fn1)
178
- plt.savefig('my_plot.png')
179
- print('Synthesizing the last output MIDI. Please stand-by... ')
180
-
181
- # url=midtoaud("deep-muse-Output-MIDI.mid",int(notes),fn_index=0)
182
- # save_as = "file.wav"
183
-
184
- # data1 = urllib.request.urlopen(url)
185
-
186
- # f = open(save_as,'wb')
187
- # f.write(data1.read())
188
- # f.close()
189
-
190
- mid = mido.MidiFile("deep-muse-Output-MIDI.mid")
191
-
192
- fs = FluidSynth()
193
- fs.midi_to_audio("deep-muse-Output-MIDI.mid", 'file.wav')
194
- return 'file.wav','my_plot.png'
195
-
196
- demo = gr.Interface(
197
- fn=TextToMusic,
198
- inputs=[gr.inputs.Textbox(label='Enter Prompt'),gr.inputs.Number(label='Enter Number of Notes'),gr.inputs.Checkbox(label="randomize_words_matching")],
199
- outputs=["audio","image"],
200
- examples=[["I love you very very much.I can not live without you.You always present on my mind.I often think about you.I am all out of love I am so lost without you.",100,True]],
201
- title="Lyrics Text To Music",
202
- )
203
- demo.launch(debug=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/Text2Human/Text2Human/models/losses/__init__.py DELETED
File without changes
spaces/CVPR/lama-example/models/ade20k/segm_lib/nn/modules/__init__.py DELETED
@@ -1,12 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # File : __init__.py
3
- # Author : Jiayuan Mao
4
- # Email : [email protected]
5
- # Date : 27/01/2018
6
- #
7
- # This file is part of Synchronized-BatchNorm-PyTorch.
8
- # https://github.com/vacancy/Synchronized-BatchNorm-PyTorch
9
- # Distributed under MIT License.
10
-
11
- from .batchnorm import SynchronizedBatchNorm1d, SynchronizedBatchNorm2d, SynchronizedBatchNorm3d
12
- from .replicate import DataParallelWithCallback, patch_replication_callback
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/lama-example/models/ade20k/segm_lib/nn/modules/replicate.py DELETED
@@ -1,94 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # File : replicate.py
3
- # Author : Jiayuan Mao
4
- # Email : [email protected]
5
- # Date : 27/01/2018
6
- #
7
- # This file is part of Synchronized-BatchNorm-PyTorch.
8
- # https://github.com/vacancy/Synchronized-BatchNorm-PyTorch
9
- # Distributed under MIT License.
10
-
11
- import functools
12
-
13
- from torch.nn.parallel.data_parallel import DataParallel
14
-
15
- __all__ = [
16
- 'CallbackContext',
17
- 'execute_replication_callbacks',
18
- 'DataParallelWithCallback',
19
- 'patch_replication_callback'
20
- ]
21
-
22
-
23
- class CallbackContext(object):
24
- pass
25
-
26
-
27
- def execute_replication_callbacks(modules):
28
- """
29
- Execute an replication callback `__data_parallel_replicate__` on each module created by original replication.
30
-
31
- The callback will be invoked with arguments `__data_parallel_replicate__(ctx, copy_id)`
32
-
33
- Note that, as all modules are isomorphism, we assign each sub-module with a context
34
- (shared among multiple copies of this module on different devices).
35
- Through this context, different copies can share some information.
36
-
37
- We guarantee that the callback on the master copy (the first copy) will be called ahead of calling the callback
38
- of any slave copies.
39
- """
40
- master_copy = modules[0]
41
- nr_modules = len(list(master_copy.modules()))
42
- ctxs = [CallbackContext() for _ in range(nr_modules)]
43
-
44
- for i, module in enumerate(modules):
45
- for j, m in enumerate(module.modules()):
46
- if hasattr(m, '__data_parallel_replicate__'):
47
- m.__data_parallel_replicate__(ctxs[j], i)
48
-
49
-
50
- class DataParallelWithCallback(DataParallel):
51
- """
52
- Data Parallel with a replication callback.
53
-
54
- An replication callback `__data_parallel_replicate__` of each module will be invoked after being created by
55
- original `replicate` function.
56
- The callback will be invoked with arguments `__data_parallel_replicate__(ctx, copy_id)`
57
-
58
- Examples:
59
- > sync_bn = SynchronizedBatchNorm1d(10, eps=1e-5, affine=False)
60
- > sync_bn = DataParallelWithCallback(sync_bn, device_ids=[0, 1])
61
- # sync_bn.__data_parallel_replicate__ will be invoked.
62
- """
63
-
64
- def replicate(self, module, device_ids):
65
- modules = super(DataParallelWithCallback, self).replicate(module, device_ids)
66
- execute_replication_callbacks(modules)
67
- return modules
68
-
69
-
70
- def patch_replication_callback(data_parallel):
71
- """
72
- Monkey-patch an existing `DataParallel` object. Add the replication callback.
73
- Useful when you have customized `DataParallel` implementation.
74
-
75
- Examples:
76
- > sync_bn = SynchronizedBatchNorm1d(10, eps=1e-5, affine=False)
77
- > sync_bn = DataParallel(sync_bn, device_ids=[0, 1])
78
- > patch_replication_callback(sync_bn)
79
- # this is equivalent to
80
- > sync_bn = SynchronizedBatchNorm1d(10, eps=1e-5, affine=False)
81
- > sync_bn = DataParallelWithCallback(sync_bn, device_ids=[0, 1])
82
- """
83
-
84
- assert isinstance(data_parallel, DataParallel)
85
-
86
- old_replicate = data_parallel.replicate
87
-
88
- @functools.wraps(old_replicate)
89
- def new_replicate(module, device_ids):
90
- modules = old_replicate(module, device_ids)
91
- execute_replication_callbacks(modules)
92
- return modules
93
-
94
- data_parallel.replicate = new_replicate
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/ChrisCaviar/ControlNet-v1-1/app_scribble.py DELETED
@@ -1,105 +0,0 @@
1
- #!/usr/bin/env python
2
-
3
- import gradio as gr
4
-
5
- from utils import randomize_seed_fn
6
-
7
-
8
- def create_demo(process, max_images=12, default_num_images=3):
9
- with gr.Blocks() as demo:
10
- with gr.Row():
11
- with gr.Column():
12
- image = gr.Image()
13
- prompt = gr.Textbox(label='Prompt')
14
- run_button = gr.Button('Run')
15
- with gr.Accordion('Advanced options', open=False):
16
- preprocessor_name = gr.Radio(
17
- label='Preprocessor',
18
- choices=['HED', 'PidiNet', 'None'],
19
- type='value',
20
- value='HED')
21
- num_samples = gr.Slider(label='Number of images',
22
- minimum=1,
23
- maximum=max_images,
24
- value=default_num_images,
25
- step=1)
26
- image_resolution = gr.Slider(label='Image resolution',
27
- minimum=256,
28
- maximum=512,
29
- value=512,
30
- step=256)
31
- preprocess_resolution = gr.Slider(
32
- label='Preprocess resolution',
33
- minimum=128,
34
- maximum=512,
35
- value=512,
36
- step=1)
37
- num_steps = gr.Slider(label='Number of steps',
38
- minimum=1,
39
- maximum=100,
40
- value=20,
41
- step=1)
42
- guidance_scale = gr.Slider(label='Guidance scale',
43
- minimum=0.1,
44
- maximum=30.0,
45
- value=9.0,
46
- step=0.1)
47
- seed = gr.Slider(label='Seed',
48
- minimum=0,
49
- maximum=1000000,
50
- step=1,
51
- value=0,
52
- randomize=True)
53
- randomize_seed = gr.Checkbox(label='Randomize seed',
54
- value=True)
55
- a_prompt = gr.Textbox(
56
- label='Additional prompt',
57
- value='best quality, extremely detailed')
58
- n_prompt = gr.Textbox(
59
- label='Negative prompt',
60
- value=
61
- 'longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality'
62
- )
63
- with gr.Column():
64
- result = gr.Gallery(label='Output', show_label=False).style(
65
- columns=2, object_fit='scale-down')
66
- inputs = [
67
- image,
68
- prompt,
69
- a_prompt,
70
- n_prompt,
71
- num_samples,
72
- image_resolution,
73
- preprocess_resolution,
74
- num_steps,
75
- guidance_scale,
76
- seed,
77
- preprocessor_name,
78
- ]
79
- prompt.submit(
80
- fn=randomize_seed_fn,
81
- inputs=[seed, randomize_seed],
82
- outputs=seed,
83
- ).then(
84
- fn=process,
85
- inputs=inputs,
86
- outputs=result,
87
- )
88
- run_button.click(
89
- fn=randomize_seed_fn,
90
- inputs=[seed, randomize_seed],
91
- outputs=seed,
92
- ).then(
93
- fn=process,
94
- inputs=inputs,
95
- outputs=result,
96
- api_name='scribble',
97
- )
98
- return demo
99
-
100
-
101
- if __name__ == '__main__':
102
- from model import Model
103
- model = Model(task_name='scribble')
104
- demo = create_demo(model.process_scribble)
105
- demo.queue().launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CoPoBio/skin_cancer_risk_prediction/README.md DELETED
@@ -1,13 +0,0 @@
1
- ---
2
- title: Skin Cancer Risk Prediction
3
- emoji: 🚀
4
- colorFrom: gray
5
- colorTo: purple
6
- sdk: gradio
7
- sdk_version: 3.48.0
8
- app_file: app.py
9
- pinned: false
10
- license: apache-2.0
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CohereForAI/pokemon-cards-explorer/src/upsert.py DELETED
@@ -1,70 +0,0 @@
1
- import os
2
- import openai
3
- import pinecone
4
- from datasets import load_dataset
5
-
6
- from torch.utils.data import DataLoader
7
-
8
- OPENAI_API_KEY = os.environ['OPENAI_API_KEY']
9
- PINECONE_API_KEY = os.environ['PINECONE_API_KEY']
10
-
11
- openai.api_key = OPENAI_API_KEY
12
-
13
- pinecone.init(
14
- api_key=PINECONE_API_KEY,
15
- environment='us-west1-gcp'
16
- )
17
- index = pinecone.Index('pokemon-cards-v2')
18
-
19
-
20
-
21
- pcds = load_dataset("bhavnicksm/PokemonCardsPlus", split='train')
22
-
23
- def get_emb_text(example):
24
- text = ""
25
- text += f"Name: {example['name']}\n"
26
- text += f"Set Name: {example['set_name']}\n"
27
- text += f"Pokemon Caption: {example['blip_caption']}\n"
28
- text += f"Card Description: {example['caption']}\n"
29
- text += f"Pokemon Description: {example['pokemon_intro']}\n"
30
- text += f"Pokedex Entry: {example['pokedex_text']}"
31
- return text
32
-
33
- pcds = pcds.map(lambda example: {"text" : get_emb_text(example)})
34
- pcds = pcds.map(lambda example : {"pokemon_image" : example['pokemon_image'] if example['pokemon_image'] != None else ''})
35
- pcds = pcds.map(lambda example : {"pokemon_intro" : example['pokemon_intro'] if example['pokemon_intro'] != None else ''})
36
- pcds = pcds.map(lambda example : {"pokedex_text" : example['pokedex_text'] if example['pokedex_text'] != None else ''})
37
- pcds = pcds.map(lambda example : {"blip_caption" : example['blip_caption'] if example['blip_caption'] != None else ''})
38
-
39
- dl = DataLoader(pcds, batch_size=64)
40
-
41
- pinecone_obj = {'id': None, 'values': None, 'metadata' : None}
42
-
43
- for batch in dl:
44
-
45
- upsert_list = []
46
- texts = batch['text']
47
-
48
- response = openai.Embedding.create(
49
- model="text-embedding-ada-002",
50
- input=texts
51
- )
52
- embs = [x['embedding'] for x in response['data']]
53
-
54
- for i in range(len(batch['id'])):
55
- pcd = pinecone_obj.copy()
56
- pcd['id'] = batch['id'][i]
57
- pcd['values'] = embs[i]
58
- pcd['metadata'] = {"img_url": batch['card_image'][i],
59
- "pokimg_url" : batch['pokemon_image'][i] if batch['pokemon_image'][i] != None else '',
60
- "name" : batch['name'][i],
61
- "description": batch['caption'][i],
62
- "pokemon_intro": batch['pokemon_intro'][i] if batch['pokemon_intro'][i] != None else '',
63
- "pokedex_entry": batch['pokedex_text'][i] if batch['pokedex_text'][i] != None else '',
64
- "blip_caption" : batch['blip_caption'][i] if batch['blip_caption'][i] != None else '',
65
- "hp": int(batch['hp'][i])}
66
- upsert_list.append(pcd)
67
-
68
- upsert_resp = index.upsert(vectors=upsert_list)
69
-
70
- print(index.describe_index_stats())
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CorvaeOboro/gen_ability_icon/torch_utils/ops/upfirdn2d.h DELETED
@@ -1,59 +0,0 @@
1
- // Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
2
- //
3
- // NVIDIA CORPORATION and its licensors retain all intellectual property
4
- // and proprietary rights in and to this software, related documentation
5
- // and any modifications thereto. Any use, reproduction, disclosure or
6
- // distribution of this software and related documentation without an express
7
- // license agreement from NVIDIA CORPORATION is strictly prohibited.
8
-
9
- #include <cuda_runtime.h>
10
-
11
- //------------------------------------------------------------------------
12
- // CUDA kernel parameters.
13
-
14
- struct upfirdn2d_kernel_params
15
- {
16
- const void* x;
17
- const float* f;
18
- void* y;
19
-
20
- int2 up;
21
- int2 down;
22
- int2 pad0;
23
- int flip;
24
- float gain;
25
-
26
- int4 inSize; // [width, height, channel, batch]
27
- int4 inStride;
28
- int2 filterSize; // [width, height]
29
- int2 filterStride;
30
- int4 outSize; // [width, height, channel, batch]
31
- int4 outStride;
32
- int sizeMinor;
33
- int sizeMajor;
34
-
35
- int loopMinor;
36
- int loopMajor;
37
- int loopX;
38
- int launchMinor;
39
- int launchMajor;
40
- };
41
-
42
- //------------------------------------------------------------------------
43
- // CUDA kernel specialization.
44
-
45
- struct upfirdn2d_kernel_spec
46
- {
47
- void* kernel;
48
- int tileOutW;
49
- int tileOutH;
50
- int loopMinor;
51
- int loopX;
52
- };
53
-
54
- //------------------------------------------------------------------------
55
- // CUDA kernel selection.
56
-
57
- template <class T> upfirdn2d_kernel_spec choose_upfirdn2d_kernel(const upfirdn2d_kernel_params& p);
58
-
59
- //------------------------------------------------------------------------
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DAOGEN/README/README.md DELETED
@@ -1,52 +0,0 @@
1
- ---
2
- title: README
3
- emoji: 🦄
4
- colorFrom: purple
5
- colorTo: yellow
6
- sdk: static
7
- pinned: false
8
- ---
9
-
10
- # 🎉 Welcome to the DAOGEN.ai Universe! 🌟
11
-
12
- 👋 Hey there, fellow adventurers! Get ready to dive into the immersive world of DAOGEN, where AI meets blockchain and interactive storytelling! 🚀
13
-
14
- ## About DAOGEN 🌍
15
-
16
- DAOGEN is not your ordinary project. We're on a mission to revolutionize storytelling and bring it to new frontiers! With the power of AI, blockchain, and the collective imagination of our community, we're building an unparalleled universe of captivating narratives and exciting adventures. 📚✨
17
-
18
- ## Main Characters 🎭
19
-
20
- ### 1. Luna Vega 🌙🎧💃🎨
21
-
22
- Luna Vega, our fearless Latina heroine, combines her skills as a boxer, hip-hop dancer, and graffiti artist to bring her unique flair to the digital realm. She's ready to inspire and empower others to unlock their creative potential. Get ready to dance to the rhythm of Luna's beats! 💥💃
23
-
24
- ### 2. DJ Squircle 🎵🪐🎚️
25
-
26
- DJ Squircle, the master of sound and cosmic beats, will take you on an intergalactic journey like no other. Armed with the power of the Force hidden within otherworldly melodies, DJ Squircle is on a mission to share the magic of music with the world. Prepare for an epic sonic adventure! 🎵🌌✨
27
-
28
- ### 3. Orion Galileo 🔬🚀🔭
29
-
30
- Orion Galileo, the brilliant scientist and inventor, is the genius behind the mind-bending technologies that drive the DAOGEN universe forward. With their unquenchable curiosity and groundbreaking innovations, they open doors to new realms of exploration and wonder. Prepare to be amazed by Orion's mind-blowing creations! 🧪🌠🔬
31
-
32
- ### 4. The Sentinels 🗿🔐🔍
33
-
34
- The Sentinels, ancient guardians of wisdom and secrets, hold the key to unlocking the mysteries of DAOGEN. With their enigmatic presence and immense power, they guide adventurers through the vast universe, revealing hidden knowledge and challenging them to discover their true potential. Seek their guidance and unravel the secrets they protect! 🕵️‍♀️🔐🗺️
35
-
36
- ## Getting Started 🚀
37
-
38
- To embark on your DAOGEN adventure, simply sign up for the next Chapter on our website and let the journey begin! 🌟💻
39
-
40
- ## Contributing 🤝
41
-
42
- We thrive on the creativity and passion of our community! If you're excited to enhance our AI models, weave more interactivity into our narratives, or bring new characters to life, we welcome your contributions. Check out our website to sign up for the next Chapter we will be starting soon and join the adventure and become a part of the DAOGEN legacy! 🎉📝
43
-
44
- ## Contact 📞✉️
45
-
46
- Questions, ideas, or just want to chat about all things DAOGEN? Reach out to us! You can find our contact information on our website. Let's connect and shape the future of immersive storytelling together! 🌈✨
47
-
48
- Get ready to unleash your creative force and embark on an adventure like no other! The DAOGEN universe awaits you! 🚀🌌
49
-
50
- Happy storytelling,
51
-
52
- The DAOGEN Team
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/PIL/GribStubImagePlugin.py DELETED
@@ -1,73 +0,0 @@
1
- #
2
- # The Python Imaging Library
3
- # $Id$
4
- #
5
- # GRIB stub adapter
6
- #
7
- # Copyright (c) 1996-2003 by Fredrik Lundh
8
- #
9
- # See the README file for information on usage and redistribution.
10
- #
11
-
12
- from . import Image, ImageFile
13
-
14
- _handler = None
15
-
16
-
17
- def register_handler(handler):
18
- """
19
- Install application-specific GRIB image handler.
20
-
21
- :param handler: Handler object.
22
- """
23
- global _handler
24
- _handler = handler
25
-
26
-
27
- # --------------------------------------------------------------------
28
- # Image adapter
29
-
30
-
31
- def _accept(prefix):
32
- return prefix[:4] == b"GRIB" and prefix[7] == 1
33
-
34
-
35
- class GribStubImageFile(ImageFile.StubImageFile):
36
- format = "GRIB"
37
- format_description = "GRIB"
38
-
39
- def _open(self):
40
- offset = self.fp.tell()
41
-
42
- if not _accept(self.fp.read(8)):
43
- msg = "Not a GRIB file"
44
- raise SyntaxError(msg)
45
-
46
- self.fp.seek(offset)
47
-
48
- # make something up
49
- self.mode = "F"
50
- self._size = 1, 1
51
-
52
- loader = self._load()
53
- if loader:
54
- loader.open(self)
55
-
56
- def _load(self):
57
- return _handler
58
-
59
-
60
- def _save(im, fp, filename):
61
- if _handler is None or not hasattr(_handler, "save"):
62
- msg = "GRIB save handler not installed"
63
- raise OSError(msg)
64
- _handler.save(im, fp, filename)
65
-
66
-
67
- # --------------------------------------------------------------------
68
- # Registry
69
-
70
- Image.register_open(GribStubImageFile.format, GribStubImageFile, _accept)
71
- Image.register_save(GribStubImageFile.format, _save)
72
-
73
- Image.register_extension(GribStubImageFile.format, ".grib")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/PIL/PcdImagePlugin.py DELETED
@@ -1,62 +0,0 @@
1
- #
2
- # The Python Imaging Library.
3
- # $Id$
4
- #
5
- # PCD file handling
6
- #
7
- # History:
8
- # 96-05-10 fl Created
9
- # 96-05-27 fl Added draft mode (128x192, 256x384)
10
- #
11
- # Copyright (c) Secret Labs AB 1997.
12
- # Copyright (c) Fredrik Lundh 1996.
13
- #
14
- # See the README file for information on usage and redistribution.
15
- #
16
-
17
-
18
- from . import Image, ImageFile
19
-
20
- ##
21
- # Image plugin for PhotoCD images. This plugin only reads the 768x512
22
- # image from the file; higher resolutions are encoded in a proprietary
23
- # encoding.
24
-
25
-
26
- class PcdImageFile(ImageFile.ImageFile):
27
- format = "PCD"
28
- format_description = "Kodak PhotoCD"
29
-
30
- def _open(self):
31
- # rough
32
- self.fp.seek(2048)
33
- s = self.fp.read(2048)
34
-
35
- if s[:4] != b"PCD_":
36
- msg = "not a PCD file"
37
- raise SyntaxError(msg)
38
-
39
- orientation = s[1538] & 3
40
- self.tile_post_rotate = None
41
- if orientation == 1:
42
- self.tile_post_rotate = 90
43
- elif orientation == 3:
44
- self.tile_post_rotate = -90
45
-
46
- self.mode = "RGB"
47
- self._size = 768, 512 # FIXME: not correct for rotated images!
48
- self.tile = [("pcd", (0, 0) + self.size, 96 * 2048, None)]
49
-
50
- def load_end(self):
51
- if self.tile_post_rotate:
52
- # Handle rotated PCDs
53
- self.im = self.im.rotate(self.tile_post_rotate)
54
- self._size = self.im.size
55
-
56
-
57
- #
58
- # registry
59
-
60
- Image.register_open(PcdImageFile.format, PcdImageFile)
61
-
62
- Image.register_extension(PcdImageFile.format, ".pcd")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fontTools/ttLib/tables/T_S_I__3.py DELETED
@@ -1,20 +0,0 @@
1
- """ TSI{0,1,2,3,5} are private tables used by Microsoft Visual TrueType (VTT)
2
- tool to store its hinting source data.
3
-
4
- TSI3 contains the text of the glyph programs in the form of 'VTTTalk' code.
5
- """
6
- from fontTools import ttLib
7
-
8
- superclass = ttLib.getTableClass("TSI1")
9
-
10
-
11
- class table_T_S_I__3(superclass):
12
-
13
- extras = {
14
- 0xFFFA: "reserved0",
15
- 0xFFFB: "reserved1",
16
- 0xFFFC: "reserved2",
17
- 0xFFFD: "reserved3",
18
- }
19
-
20
- indextable = "TSI2"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/templates/cdn/assets/index-3cb0bda2.js DELETED
@@ -1,2 +0,0 @@
1
- import{S as r,e as h,s as v,k as g,o as w,z,v as k,x as B,a4 as C,P as R,p as S,R as q,A,F}from"./index-1d65707a.js";import{a as P}from"./Button-f155035a.js";import{X}from"./Blocks-c9e1499d.js";function j(t){let i=t[9](t[3])+"",a;return{c(){a=R(i)},m(e,s){S(e,a,s)},p(e,s){s&520&&i!==(i=e[9](e[3])+"")&&q(a,i)},d(e){e&&A(a)}}}function D(t){let i,a;return i=new P({props:{variant:t[4],elem_id:t[0],elem_classes:t[1],size:t[6],scale:t[7],min_width:t[8],visible:t[2],disabled:t[5]==="static",$$slots:{default:[j]},$$scope:{ctx:t}}}),i.$on("click",t[10]),{c(){g(i.$$.fragment)},m(e,s){w(i,e,s),a=!0},p(e,[s]){const l={};s&16&&(l.variant=e[4]),s&1&&(l.elem_id=e[0]),s&2&&(l.elem_classes=e[1]),s&64&&(l.size=e[6]),s&128&&(l.scale=e[7]),s&256&&(l.min_width=e[8]),s&4&&(l.visible=e[2]),s&32&&(l.disabled=e[5]==="static"),s&2568&&(l.$$scope={dirty:s,ctx:e}),i.$set(l)},i(e){a||(z(i.$$.fragment,e),a=!0)},o(e){k(i.$$.fragment,e),a=!1},d(e){B(i,e)}}}function E(t,i,a){let e;C(t,X,n=>a(9,e=n));let{elem_id:s=""}=i,{elem_classes:l=[]}=i,{visible:m=!0}=i,{value:u}=i,{variant:_="secondary"}=i,{mode:f="dynamic"}=i,{size:o="lg"}=i,{scale:c=null}=i,{min_width:d=void 0}=i;function b(n){F.call(this,t,n)}return t.$$set=n=>{"elem_id"in n&&a(0,s=n.elem_id),"elem_classes"in n&&a(1,l=n.elem_classes),"visible"in n&&a(2,m=n.visible),"value"in n&&a(3,u=n.value),"variant"in n&&a(4,_=n.variant),"mode"in n&&a(5,f=n.mode),"size"in n&&a(6,o=n.size),"scale"in n&&a(7,c=n.scale),"min_width"in n&&a(8,d=n.min_width)},[s,l,m,u,_,f,o,c,d,e,b]}class G extends r{constructor(i){super(),h(this,i,E,D,v,{elem_id:0,elem_classes:1,visible:2,value:3,variant:4,mode:5,size:6,scale:7,min_width:8})}}const K=G,L=["static","dynamic"],M=t=>({type:{payload:"string"},description:{payload:"button label"},example_data:t.value||"Run"});export{K as Component,M as document,L as modes};
2
- //# sourceMappingURL=index-3cb0bda2.js.map
 
 
 
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/templates/frontend/assets/Button-89624748.js DELETED
@@ -1,4 +0,0 @@
1
- import{i as Q,a8 as C,S as q,e as A,s as E,z as k,v as B,a9 as I,E as T,N as L,aa as U,U as c,L as o,p as V,ab as D,ac as F,ad as K,q as G,A as N,K as y,Q as H,F as J}from"./index-3370be2a.js";function M(t){const e=t-1;return e*e*e+1}function x(t,{delay:e=0,duration:i=400,easing:n=Q}={}){const u=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:n,css:d=>`opacity: ${d*u}`}}function p(t,{delay:e=0,duration:i=400,easing:n=M,x:u=0,y:d=0,opacity:m=0}={}){const f=getComputedStyle(t),l=+f.opacity,s=f.transform==="none"?"":f.transform,h=l*(1-m),[r,b]=C(u),[w,_]=C(d);return{delay:e,duration:i,easing:n,css:(g,v)=>`
2
- transform: ${s} translate(${(1-g)*r}${b}, ${(1-g)*w}${_});
3
- opacity: ${l-h*v}`}}function P(t){let e,i,n;const u=t[17].default,d=I(u,t,t[16],null);let m=[{"data-testid":t[7]},{id:t[2]},{class:i="block "+t[3].join(" ")+" svelte-90oupt"}],f={};for(let l=0;l<m.length;l+=1)f=T(f,m[l]);return{c(){e=L(t[14]),d&&d.c(),U(t[14])(e,f),c(e,"hidden",t[10]===!1),c(e,"padded",t[6]),c(e,"border_focus",t[5]==="focus"),c(e,"hide-container",!t[8]&&!t[9]),o(e,"height",typeof t[0]=="number"?t[0]+"px":void 0),o(e,"width",typeof t[1]=="number"?`calc(min(${t[1]}px, 100%))`:void 0),o(e,"border-style",t[4]),o(e,"overflow",t[11]?"visible":"hidden"),o(e,"flex-grow",t[12]),o(e,"min-width",`calc(min(${t[13]}px, 100%))`),o(e,"border-width","var(--block-border-width)")},m(l,s){V(l,e,s),d&&d.m(e,null),n=!0},p(l,s){d&&d.p&&(!n||s&65536)&&D(d,u,l,l[16],n?K(u,l[16],s,null):F(l[16]),null),U(l[14])(e,f=G(m,[(!n||s&128)&&{"data-testid":l[7]},(!n||s&4)&&{id:l[2]},(!n||s&8&&i!==(i="block "+l[3].join(" ")+" svelte-90oupt"))&&{class:i}])),c(e,"hidden",l[10]===!1),c(e,"padded",l[6]),c(e,"border_focus",l[5]==="focus"),c(e,"hide-container",!l[8]&&!l[9]),s&1&&o(e,"height",typeof l[0]=="number"?l[0]+"px":void 0),s&2&&o(e,"width",typeof l[1]=="number"?`calc(min(${l[1]}px, 100%))`:void 0),s&16&&o(e,"border-style",l[4]),s&2048&&o(e,"overflow",l[11]?"visible":"hidden"),s&4096&&o(e,"flex-grow",l[12]),s&8192&&o(e,"min-width",`calc(min(${l[13]}px, 100%))`)},i(l){n||(k(d,l),n=!0)},o(l){B(d,l),n=!1},d(l){l&&N(e),d&&d.d(l)}}}function R(t){let e,i=t[14]&&P(t);return{c(){i&&i.c()},m(n,u){i&&i.m(n,u),e=!0},p(n,[u]){n[14]&&i.p(n,u)},i(n){e||(k(i,n),e=!0)},o(n){B(i,n),e=!1},d(n){i&&i.d(n)}}}function W(t,e,i){let{$$slots:n={},$$scope:u}=e,{height:d=void 0}=e,{width:m=void 0}=e,{elem_id:f=""}=e,{elem_classes:l=[]}=e,{variant:s="solid"}=e,{border_mode:h="base"}=e,{padding:r=!0}=e,{type:b="normal"}=e,{test_id:w=void 0}=e,{explicit_call:_=!1}=e,{container:g=!0}=e,{visible:v=!0}=e,{allow_overflow:z=!0}=e,{scale:j=null}=e,{min_width:S=0}=e,O=b==="fieldset"?"fieldset":"div";return t.$$set=a=>{"height"in a&&i(0,d=a.height),"width"in a&&i(1,m=a.width),"elem_id"in a&&i(2,f=a.elem_id),"elem_classes"in a&&i(3,l=a.elem_classes),"variant"in a&&i(4,s=a.variant),"border_mode"in a&&i(5,h=a.border_mode),"padding"in a&&i(6,r=a.padding),"type"in a&&i(15,b=a.type),"test_id"in a&&i(7,w=a.test_id),"explicit_call"in a&&i(8,_=a.explicit_call),"container"in a&&i(9,g=a.container),"visible"in a&&i(10,v=a.visible),"allow_overflow"in a&&i(11,z=a.allow_overflow),"scale"in a&&i(12,j=a.scale),"min_width"in a&&i(13,S=a.min_width),"$$scope"in a&&i(16,u=a.$$scope)},[d,m,f,l,s,h,r,w,_,g,v,z,j,S,O,b,u,n]}class $ extends q{constructor(e){super(),A(this,e,W,R,E,{height:0,width:1,elem_id:2,elem_classes:3,variant:4,border_mode:5,padding:6,type:15,test_id:7,explicit_call:8,container:9,visible:10,allow_overflow:11,scale:12,min_width:13})}}function X(t){let e,i,n,u,d;const m=t[9].default,f=I(m,t,t[8],null);return{c(){e=L("button"),f&&f.c(),y(e,"class",i=t[4]+" "+t[3]+" "+t[1].join(" ")+" svelte-1e89no8"),y(e,"id",t[0]),e.disabled=t[5],c(e,"hidden",!t[2]),o(e,"flex-grow",t[6]),o(e,"width",t[6]===0?"fit-content":null),o(e,"min-width",typeof t[7]=="number"?`calc(min(${t[7]}px, 100%))`:null)},m(l,s){V(l,e,s),f&&f.m(e,null),n=!0,u||(d=H(e,"click",t[10]),u=!0)},p(l,[s]){f&&f.p&&(!n||s&256)&&D(f,m,l,l[8],n?K(m,l[8],s,null):F(l[8]),null),(!n||s&26&&i!==(i=l[4]+" "+l[3]+" "+l[1].join(" ")+" svelte-1e89no8"))&&y(e,"class",i),(!n||s&1)&&y(e,"id",l[0]),(!n||s&32)&&(e.disabled=l[5]),(!n||s&30)&&c(e,"hidden",!l[2]),s&64&&o(e,"flex-grow",l[6]),s&64&&o(e,"width",l[6]===0?"fit-content":null),s&128&&o(e,"min-width",typeof l[7]=="number"?`calc(min(${l[7]}px, 100%))`:null)},i(l){n||(k(f,l),n=!0)},o(l){B(f,l),n=!1},d(l){l&&N(e),f&&f.d(l),u=!1,d()}}}function Y(t,e,i){let{$$slots:n={},$$scope:u}=e,{elem_id:d=""}=e,{elem_classes:m=[]}=e,{visible:f=!0}=e,{variant:l="secondary"}=e,{size:s="lg"}=e,{disabled:h=!1}=e,{scale:r=null}=e,{min_width:b=void 0}=e;function w(_){J.call(this,t,_)}return t.$$set=_=>{"elem_id"in _&&i(0,d=_.elem_id),"elem_classes"in _&&i(1,m=_.elem_classes),"visible"in _&&i(2,f=_.visible),"variant"in _&&i(3,l=_.variant),"size"in _&&i(4,s=_.size),"disabled"in _&&i(5,h=_.disabled),"scale"in _&&i(6,r=_.scale),"min_width"in _&&i(7,b=_.min_width),"$$scope"in _&&i(8,u=_.$$scope)},[d,m,f,l,s,h,r,b,u,n,w]}class ee extends q{constructor(e){super(),A(this,e,Y,X,E,{elem_id:0,elem_classes:1,visible:2,variant:3,size:4,disabled:5,scale:6,min_width:7})}}export{$ as B,ee as a,p as b,M as c,x as f};
4
- //# sourceMappingURL=Button-89624748.js.map
 
 
 
 
 
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/h11/tests/test_receivebuffer.py DELETED
@@ -1,135 +0,0 @@
1
- import re
2
- from typing import Tuple
3
-
4
- import pytest
5
-
6
- from .._receivebuffer import ReceiveBuffer
7
-
8
-
9
- def test_receivebuffer() -> None:
10
- b = ReceiveBuffer()
11
- assert not b
12
- assert len(b) == 0
13
- assert bytes(b) == b""
14
-
15
- b += b"123"
16
- assert b
17
- assert len(b) == 3
18
- assert bytes(b) == b"123"
19
-
20
- assert bytes(b) == b"123"
21
-
22
- assert b.maybe_extract_at_most(2) == b"12"
23
- assert b
24
- assert len(b) == 1
25
- assert bytes(b) == b"3"
26
-
27
- assert bytes(b) == b"3"
28
-
29
- assert b.maybe_extract_at_most(10) == b"3"
30
- assert bytes(b) == b""
31
-
32
- assert b.maybe_extract_at_most(10) is None
33
- assert not b
34
-
35
- ################################################################
36
- # maybe_extract_until_next
37
- ################################################################
38
-
39
- b += b"123\n456\r\n789\r\n"
40
-
41
- assert b.maybe_extract_next_line() == b"123\n456\r\n"
42
- assert bytes(b) == b"789\r\n"
43
-
44
- assert b.maybe_extract_next_line() == b"789\r\n"
45
- assert bytes(b) == b""
46
-
47
- b += b"12\r"
48
- assert b.maybe_extract_next_line() is None
49
- assert bytes(b) == b"12\r"
50
-
51
- b += b"345\n\r"
52
- assert b.maybe_extract_next_line() is None
53
- assert bytes(b) == b"12\r345\n\r"
54
-
55
- # here we stopped at the middle of b"\r\n" delimiter
56
-
57
- b += b"\n6789aaa123\r\n"
58
- assert b.maybe_extract_next_line() == b"12\r345\n\r\n"
59
- assert b.maybe_extract_next_line() == b"6789aaa123\r\n"
60
- assert b.maybe_extract_next_line() is None
61
- assert bytes(b) == b""
62
-
63
- ################################################################
64
- # maybe_extract_lines
65
- ################################################################
66
-
67
- b += b"123\r\na: b\r\nfoo:bar\r\n\r\ntrailing"
68
- lines = b.maybe_extract_lines()
69
- assert lines == [b"123", b"a: b", b"foo:bar"]
70
- assert bytes(b) == b"trailing"
71
-
72
- assert b.maybe_extract_lines() is None
73
-
74
- b += b"\r\n\r"
75
- assert b.maybe_extract_lines() is None
76
-
77
- assert b.maybe_extract_at_most(100) == b"trailing\r\n\r"
78
- assert not b
79
-
80
- # Empty body case (as happens at the end of chunked encoding if there are
81
- # no trailing headers, e.g.)
82
- b += b"\r\ntrailing"
83
- assert b.maybe_extract_lines() == []
84
- assert bytes(b) == b"trailing"
85
-
86
-
87
- @pytest.mark.parametrize(
88
- "data",
89
- [
90
- pytest.param(
91
- (
92
- b"HTTP/1.1 200 OK\r\n",
93
- b"Content-type: text/plain\r\n",
94
- b"Connection: close\r\n",
95
- b"\r\n",
96
- b"Some body",
97
- ),
98
- id="with_crlf_delimiter",
99
- ),
100
- pytest.param(
101
- (
102
- b"HTTP/1.1 200 OK\n",
103
- b"Content-type: text/plain\n",
104
- b"Connection: close\n",
105
- b"\n",
106
- b"Some body",
107
- ),
108
- id="with_lf_only_delimiter",
109
- ),
110
- pytest.param(
111
- (
112
- b"HTTP/1.1 200 OK\n",
113
- b"Content-type: text/plain\r\n",
114
- b"Connection: close\n",
115
- b"\n",
116
- b"Some body",
117
- ),
118
- id="with_mixed_crlf_and_lf",
119
- ),
120
- ],
121
- )
122
- def test_receivebuffer_for_invalid_delimiter(data: Tuple[bytes]) -> None:
123
- b = ReceiveBuffer()
124
-
125
- for line in data:
126
- b += line
127
-
128
- lines = b.maybe_extract_lines()
129
-
130
- assert lines == [
131
- b"HTTP/1.1 200 OK",
132
- b"Content-type: text/plain",
133
- b"Connection: close",
134
- ]
135
- assert bytes(b) == b"Some body"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DaleChen/AutoGPT/autogpt/setup.py DELETED
@@ -1,77 +0,0 @@
1
- """Set up the AI and its goals"""
2
- from colorama import Fore, Style
3
-
4
- from autogpt import utils
5
- from autogpt.config.ai_config import AIConfig
6
- from autogpt.logs import logger
7
-
8
-
9
- def prompt_user() -> AIConfig:
10
- """Prompt the user for input
11
-
12
- Returns:
13
- AIConfig: The AIConfig object containing the user's input
14
- """
15
- ai_name = ""
16
- # Construct the prompt
17
- logger.typewriter_log(
18
- "Welcome to Auto-GPT! ",
19
- Fore.GREEN,
20
- "run with '--help' for more information.",
21
- speak_text=True,
22
- )
23
-
24
- logger.typewriter_log(
25
- "Create an AI-Assistant:",
26
- Fore.GREEN,
27
- "Enter the name of your AI and its role below. Entering nothing will load"
28
- " defaults.",
29
- speak_text=True,
30
- )
31
-
32
- # Get AI Name from User
33
- logger.typewriter_log(
34
- "Name your AI: ", Fore.GREEN, "For example, 'Entrepreneur-GPT'"
35
- )
36
- ai_name = utils.clean_input("AI Name: ")
37
- if ai_name == "":
38
- ai_name = "Entrepreneur-GPT"
39
-
40
- logger.typewriter_log(
41
- f"{ai_name} here!", Fore.LIGHTBLUE_EX, "I am at your service.", speak_text=True
42
- )
43
-
44
- # Get AI Role from User
45
- logger.typewriter_log(
46
- "Describe your AI's role: ",
47
- Fore.GREEN,
48
- "For example, 'an AI designed to autonomously develop and run businesses with"
49
- " the sole goal of increasing your net worth.'",
50
- )
51
- ai_role = utils.clean_input(f"{ai_name} is: ")
52
- if ai_role == "":
53
- ai_role = "an AI designed to autonomously develop and run businesses with the"
54
- " sole goal of increasing your net worth."
55
-
56
- # Enter up to 5 goals for the AI
57
- logger.typewriter_log(
58
- "Enter up to 5 goals for your AI: ",
59
- Fore.GREEN,
60
- "For example: \nIncrease net worth, Grow Twitter Account, Develop and manage"
61
- " multiple businesses autonomously'",
62
- )
63
- print("Enter nothing to load defaults, enter nothing when finished.", flush=True)
64
- ai_goals = []
65
- for i in range(5):
66
- ai_goal = utils.clean_input(f"{Fore.LIGHTBLUE_EX}Goal{Style.RESET_ALL} {i+1}: ")
67
- if ai_goal == "":
68
- break
69
- ai_goals.append(ai_goal)
70
- if not ai_goals:
71
- ai_goals = [
72
- "Increase net worth",
73
- "Grow Twitter Account",
74
- "Develop and manage multiple businesses autonomously",
75
- ]
76
-
77
- return AIConfig(ai_name, ai_role, ai_goals)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Docfile/open_llm_leaderboard/src/display_models/utils.py DELETED
@@ -1,146 +0,0 @@
1
- import os
2
- from dataclasses import dataclass
3
-
4
- from huggingface_hub import HfApi
5
-
6
- API = HfApi()
7
-
8
-
9
- # These classes are for user facing column names, to avoid having to change them
10
- # all around the code when a modif is needed
11
- @dataclass
12
- class ColumnContent:
13
- name: str
14
- type: str
15
- displayed_by_default: bool
16
- hidden: bool = False
17
-
18
-
19
- def fields(raw_class):
20
- return [v for k, v in raw_class.__dict__.items() if k[:2] != "__" and k[-2:] != "__"]
21
-
22
-
23
- @dataclass(frozen=True)
24
- class AutoEvalColumn: # Auto evals column
25
- model_type_symbol = ColumnContent("T", "str", True)
26
- model = ColumnContent("Model", "markdown", True)
27
- average = ColumnContent("Average ⬆️", "number", True)
28
- arc = ColumnContent("ARC", "number", True)
29
- hellaswag = ColumnContent("HellaSwag", "number", True)
30
- mmlu = ColumnContent("MMLU", "number", True)
31
- truthfulqa = ColumnContent("TruthfulQA", "number", True)
32
- model_type = ColumnContent("Type", "str", False)
33
- precision = ColumnContent("Precision", "str", False) # , True)
34
- license = ColumnContent("Hub License", "str", False)
35
- params = ColumnContent("#Params (B)", "number", False)
36
- likes = ColumnContent("Hub ❤️", "number", False)
37
- still_on_hub = ColumnContent("Available on the hub", "bool", False)
38
- revision = ColumnContent("Model sha", "str", False, False)
39
- dummy = ColumnContent(
40
- "model_name_for_query", "str", True
41
- ) # dummy col to implement search bar (hidden by custom CSS)
42
-
43
-
44
- @dataclass(frozen=True)
45
- class EloEvalColumn: # Elo evals column
46
- model = ColumnContent("Model", "markdown", True)
47
- gpt4 = ColumnContent("GPT-4 (all)", "number", True)
48
- human_all = ColumnContent("Human (all)", "number", True)
49
- human_instruct = ColumnContent("Human (instruct)", "number", True)
50
- human_code_instruct = ColumnContent("Human (code-instruct)", "number", True)
51
-
52
-
53
- @dataclass(frozen=True)
54
- class EvalQueueColumn: # Queue column
55
- model = ColumnContent("model", "markdown", True)
56
- revision = ColumnContent("revision", "str", True)
57
- private = ColumnContent("private", "bool", True)
58
- precision = ColumnContent("precision", "str", True)
59
- weight_type = ColumnContent("weight_type", "str", "Original")
60
- status = ColumnContent("status", "str", True)
61
-
62
-
63
- LLAMAS = [
64
- "huggingface/llama-7b",
65
- "huggingface/llama-13b",
66
- "huggingface/llama-30b",
67
- "huggingface/llama-65b",
68
- ]
69
-
70
-
71
- KOALA_LINK = "https://huggingface.co/TheBloke/koala-13B-HF"
72
- VICUNA_LINK = "https://huggingface.co/lmsys/vicuna-13b-delta-v1.1"
73
- OASST_LINK = "https://huggingface.co/OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5"
74
- DOLLY_LINK = "https://huggingface.co/databricks/dolly-v2-12b"
75
- MODEL_PAGE = "https://huggingface.co/models"
76
- LLAMA_LINK = "https://ai.facebook.com/blog/large-language-model-llama-meta-ai/"
77
- VICUNA_LINK = "https://huggingface.co/CarperAI/stable-vicuna-13b-delta"
78
- ALPACA_LINK = "https://crfm.stanford.edu/2023/03/13/alpaca.html"
79
-
80
-
81
- def model_hyperlink(link, model_name):
82
- return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'
83
-
84
-
85
- def make_clickable_model(model_name):
86
- link = f"https://huggingface.co/{model_name}"
87
-
88
- if model_name in LLAMAS:
89
- link = LLAMA_LINK
90
- model_name = model_name.split("/")[1]
91
- elif model_name == "HuggingFaceH4/stable-vicuna-13b-2904":
92
- link = VICUNA_LINK
93
- model_name = "stable-vicuna-13b"
94
- elif model_name == "HuggingFaceH4/llama-7b-ift-alpaca":
95
- link = ALPACA_LINK
96
- model_name = "alpaca-13b"
97
- if model_name == "dolly-12b":
98
- link = DOLLY_LINK
99
- elif model_name == "vicuna-13b":
100
- link = VICUNA_LINK
101
- elif model_name == "koala-13b":
102
- link = KOALA_LINK
103
- elif model_name == "oasst-12b":
104
- link = OASST_LINK
105
-
106
- details_model_name = model_name.replace("/", "__")
107
- details_link = f"https://huggingface.co/datasets/open-llm-leaderboard/details_{details_model_name}"
108
-
109
- if not bool(os.getenv("DEBUG", "False")):
110
- # We only add these checks when not debugging, as they are extremely slow
111
- print(f"details_link: {details_link}")
112
- try:
113
- check_path = list(
114
- API.list_files_info(
115
- repo_id=f"open-llm-leaderboard/details_{details_model_name}",
116
- paths="README.md",
117
- repo_type="dataset",
118
- )
119
- )
120
- print(f"check_path: {check_path}")
121
- except Exception as err:
122
- # No details repo for this model
123
- print(f"No details repo for this model: {err}")
124
- return model_hyperlink(link, model_name)
125
-
126
- return model_hyperlink(link, model_name) + " " + model_hyperlink(details_link, "📑")
127
-
128
-
129
- def styled_error(error):
130
- return f"<p style='color: red; font-size: 20px; text-align: center;'>{error}</p>"
131
-
132
-
133
- def styled_warning(warn):
134
- return f"<p style='color: orange; font-size: 20px; text-align: center;'>{warn}</p>"
135
-
136
-
137
- def styled_message(message):
138
- return f"<p style='color: green; font-size: 20px; text-align: center;'>{message}</p>"
139
-
140
-
141
- def has_no_nan_values(df, columns):
142
- return df[columns].notna().all(axis=1)
143
-
144
-
145
- def has_nan_values(df, columns):
146
- return df[columns].isna().any(axis=1)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Dorado607/ChuanhuChatGPT/README.md DELETED
@@ -1,13 +0,0 @@
1
- ---
2
- title: ChuanhuChatGPT
3
- emoji: 🐯
4
- colorFrom: green
5
- colorTo: red
6
- sdk: gradio
7
- sdk_version: 3.36.1
8
- app_file: ChuanhuChatbot.py
9
- pinned: false
10
- license: gpl-3.0
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Dorado607/ChuanhuChatGPT/modules/models/Google_PaLM.py DELETED
@@ -1,26 +0,0 @@
1
- from .base_model import BaseLLMModel
2
- import google.generativeai as palm
3
-
4
- class Google_PaLM_Client(BaseLLMModel):
5
- def __init__(self, model_name, api_key, user_name="") -> None:
6
- super().__init__(model_name=model_name, user=user_name)
7
- self.api_key = api_key
8
-
9
- def _get_palm_style_input(self):
10
- new_history = []
11
- for item in self.history:
12
- if item["role"] == "user":
13
- new_history.append({'author': '1', 'content': item["content"]})
14
- else:
15
- new_history.append({'author': '0', 'content': item["content"]})
16
- return new_history
17
-
18
- def get_answer_at_once(self):
19
- palm.configure(api_key=self.api_key)
20
- messages = self._get_palm_style_input()
21
- response = palm.chat(context=self.system_prompt, messages=messages, temperature=self.temperature, top_p=self.top_p)
22
- if response.last is not None:
23
- return response.last, len(response.last)
24
- else:
25
- reasons = '\n\n'.join(reason['reason'].name for reason in response.filters)
26
- return "由于下面的原因,Google 拒绝返回 PaLM 的回答:\n\n" + reasons, 0