Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,9 @@
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import OlmoeForCausalLM, AutoTokenizer
|
3 |
import torch
|
4 |
-
import os
|
5 |
|
6 |
# Initialize ZeroGPU
|
7 |
os.environ["ZEROGPU"] = "1"
|
@@ -28,4 +30,4 @@ def generate_text(prompt):
|
|
28 |
|
29 |
# Set up the Gradio chat interface
|
30 |
iface = gr.ChatInterface(fn=generate_text, system_prompt=system_prompt)
|
31 |
-
iface.launch()
|
|
|
1 |
+
import os
|
2 |
+
os.system('pip install transformers')
|
3 |
+
|
4 |
import gradio as gr
|
5 |
from transformers import OlmoeForCausalLM, AutoTokenizer
|
6 |
import torch
|
|
|
7 |
|
8 |
# Initialize ZeroGPU
|
9 |
os.environ["ZEROGPU"] = "1"
|
|
|
30 |
|
31 |
# Set up the Gradio chat interface
|
32 |
iface = gr.ChatInterface(fn=generate_text, system_prompt=system_prompt)
|
33 |
+
iface.launch()
|