Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
import transformers
|
3 |
import spaces
|
4 |
|
5 |
-
title = """🙋🏻♂️Welcome to 🌟Tonic's 🤳🏻Phi-4 Demo"""
|
6 |
|
7 |
description = """
|
8 |
This demo uses Microsoft's Phi-4 model for text generation.
|
@@ -22,7 +22,7 @@ On 🌐Github: [Tonic-AI](https://github.com/tonic-ai) & contribute to🌟 [Dark
|
|
22 |
🤗Big thanks to Yuvi Sharma and all the folks at huggingface for the community grant 🤗
|
23 |
"""
|
24 |
|
25 |
-
@spaces.GPU
|
26 |
def generate_response(system_prompt, user_prompt, max_tokens, temperature):
|
27 |
pipeline = transformers.pipeline(
|
28 |
"text-generation",
|
|
|
2 |
import transformers
|
3 |
import spaces
|
4 |
|
5 |
+
title = """# 🙋🏻♂️Welcome to 🌟Tonic's 🤳🏻Phi-4 Demo"""
|
6 |
|
7 |
description = """
|
8 |
This demo uses Microsoft's Phi-4 model for text generation.
|
|
|
22 |
🤗Big thanks to Yuvi Sharma and all the folks at huggingface for the community grant 🤗
|
23 |
"""
|
24 |
|
25 |
+
@spaces.GPU(duration=180)
|
26 |
def generate_response(system_prompt, user_prompt, max_tokens, temperature):
|
27 |
pipeline = transformers.pipeline(
|
28 |
"text-generation",
|