Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
|
2 |
|
3 |
-
|
4 |
|
5 |
|
6 |
|
@@ -112,26 +112,26 @@
|
|
112 |
|
113 |
|
114 |
|
115 |
-
import gradio as gr
|
116 |
-
from transformers import pipeline
|
117 |
-
huggingface-cli login
|
118 |
|
119 |
-
text_generator = pipeline("text-generation", model="meta-llama/Llama-3.2-1B")
|
120 |
|
121 |
-
def predict(input_text):
|
122 |
-
|
123 |
-
|
124 |
|
125 |
-
gradio_app = gr.Interface(
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
)
|
132 |
|
133 |
-
if __name__ == "__main__":
|
134 |
-
|
135 |
|
136 |
|
137 |
|
|
|
1 |
+
import gradio as gr
|
2 |
|
3 |
+
gr.load("models/microsoft/Phi-3.5-mini-instruct", max_batch_size=1000).launch(share=True)
|
4 |
|
5 |
|
6 |
|
|
|
112 |
|
113 |
|
114 |
|
115 |
+
# import gradio as gr
|
116 |
+
# from transformers import pipeline
|
117 |
+
# huggingface-cli login
|
118 |
|
119 |
+
# text_generator = pipeline("text-generation", model="meta-llama/Llama-3.2-1B")
|
120 |
|
121 |
+
# def predict(input_text):
|
122 |
+
# predictions = text_generator(input_text, max_new_tokens=50, num_return_sequences=1)
|
123 |
+
# return predictions[0]["generated_text"]
|
124 |
|
125 |
+
# gradio_app = gr.Interface(
|
126 |
+
# predict,
|
127 |
+
# inputs=gr.Textbox(label="Enter text for generation"),
|
128 |
+
# outputs=gr.Textbox(label="Generated Text"),
|
129 |
+
# title="Text Generation Model",
|
130 |
+
# description="This app generates text based on input prompts."
|
131 |
+
# )
|
132 |
|
133 |
+
# if __name__ == "__main__":
|
134 |
+
# gradio_app.launch()
|
135 |
|
136 |
|
137 |
|