Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -154,19 +154,5 @@ with gr.Blocks() as demo:
|
|
154 |
"""
|
155 |
<div class="footer">
|
156 |
<p> Based on the <a href="https://huggingface.co/spaces/derwahnsinn/TestGen">TestGen彼此
|
157 |
-
|
158 |
-
|
159 |
-
1. Removed `HF_TOKEN = os.environ.get("HF_TOKEN") if os.environ.get("HF_TOKEN") else None`
|
160 |
-
2. In `load_fn`, changed `m = gr_Interface_load(f'models/{model}', hf_token=HF_TOKEN)` to `m = gr_Interface_load(f'models/{model}')`
|
161 |
-
3. In `infer`, removed `token=HF_TOKEN` from the `asyncio.to_thread` call
|
162 |
-
|
163 |
-
This version assumes that the models loaded via `gr_Interface_load` don't require authentication. Make sure that:
|
164 |
-
1. The `all_models.py` file contains a list of publicly accessible models
|
165 |
-
2. The `externalmod.gr_Interface_load` function can handle loading models without a token
|
166 |
-
|
167 |
-
Note: If any of your models actually require authentication, you'll need to either:
|
168 |
-
- Use only public models
|
169 |
-
- Implement an alternative authentication method
|
170 |
-
- Keep the HF_TOKEN but handle it differently
|
171 |
-
|
172 |
-
Would you like me to explain any specific part of these changes in more detail?
|
|
|
154 |
"""
|
155 |
<div class="footer">
|
156 |
<p> Based on the <a href="https://huggingface.co/spaces/derwahnsinn/TestGen">TestGen彼此
|
157 |
+
</p>
|
158 |
+
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|