Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
c5d24cb
1
Parent(s):
130e53d
Move requirements installation to the top
Browse files
app.py
CHANGED
|
@@ -1,12 +1,11 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
import torch
|
| 3 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 4 |
-
|
| 5 |
import os
|
| 6 |
import subprocess
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
MODEL_ID = "le-llm/gemma-3-12b-it-reasoning"
|
| 12 |
|
|
@@ -62,5 +61,4 @@ chatbot = gr.ChatInterface(
|
|
| 62 |
],
|
| 63 |
)
|
| 64 |
|
| 65 |
-
install_requirements()
|
| 66 |
chatbot.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
import subprocess
|
| 3 |
|
| 4 |
+
subprocess.check_call([os.sys.executable, "-m", "pip", "install", "-r", "requirements.txt"])
|
| 5 |
+
|
| 6 |
+
import gradio as gr
|
| 7 |
+
import torch
|
| 8 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 9 |
|
| 10 |
MODEL_ID = "le-llm/gemma-3-12b-it-reasoning"
|
| 11 |
|
|
|
|
| 61 |
],
|
| 62 |
)
|
| 63 |
|
|
|
|
| 64 |
chatbot.launch()
|