Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
import pip
|
|
|
3 |
pip.main(['install', 'transformers'])
|
4 |
pip.main(['install', 'torch'])
|
5 |
from transformers import pipeline
|
6 |
model_name_or_path='dgnk007/eagle'
|
7 |
-
hf_writer = gr.HuggingFaceDatasetSaver(DatasetKey,DatasetName )
|
8 |
def generate_response(message):
|
9 |
prompt_template=f"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n {message}\n\n### Response:\n"
|
10 |
generate=pipeline('text-generation',model=model_name_or_path)
|
|
|
1 |
import gradio as gr
|
2 |
import pip
|
3 |
+
import os
|
4 |
pip.main(['install', 'transformers'])
|
5 |
pip.main(['install', 'torch'])
|
6 |
from transformers import pipeline
|
7 |
model_name_or_path='dgnk007/eagle'
|
8 |
+
hf_writer = gr.HuggingFaceDatasetSaver(os.environ['DatasetKey'],os.environ['DatasetName'] )
|
9 |
def generate_response(message):
|
10 |
prompt_template=f"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n {message}\n\n### Response:\n"
|
11 |
generate=pipeline('text-generation',model=model_name_or_path)
|