Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,13 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
# Initialize the text generation pipelines
|
| 5 |
pipe = pipeline("text-generation", model="akhaliq/MyGemmaGradioCoder")
|
| 6 |
-
pipe2 = pipeline("text-generation", model="google/gemma-3-270m-it")
|
| 7 |
|
| 8 |
def generate_code(user_input, model_choice="Model 1"):
|
| 9 |
"""
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
+
import os
|
| 4 |
+
|
| 5 |
+
HF_TOKEN = os.environ["HF_TOKEN"]
|
| 6 |
+
|
| 7 |
|
| 8 |
# Initialize the text generation pipelines
|
| 9 |
pipe = pipeline("text-generation", model="akhaliq/MyGemmaGradioCoder")
|
| 10 |
+
pipe2 = pipeline("text-generation", model="google/gemma-3-270m-it", token=HF_TOKEN)
|
| 11 |
|
| 12 |
def generate_code(user_input, model_choice="Model 1"):
|
| 13 |
"""
|